Originally posted by bradgrafelman
<input type="text" name="myArrayElement[]">
<input type="text" name="myArrayElement[]">
<input type="text" name="myArrayElement[]">
I'm not 100%, but I'm pretty sure that is how you do it. [/B]
Spot on, as ever Braddders.
Php arrays are absolutely invaluable. I've written a URL database running on my local machine that grabs urls from Firefox and IE if I put them in a part of the bookmarks called Link Dump, then if you want to move them to a new section on the database or delete them you just tick the checkboxes with their primary keys, e.g.
<input type="checkbox" name="changebox[]" value="275">
Then you just go through the list on submmit like
$ids = implode(',', $_POST['changebox']);
$q = 'DELETE FROM urls WHERE id IN ('.$ids.')';
$db->safe_query($q);