Scratching my head over this one. It should be simple lol
I am passing the values of my checkboxes to an array. I
I then want to put the array in to a foreach loop and then take the id number and removes the records from the database using the foreach loop
(HAVE NOT INCLUDED DB CODE)
However after the passing the values from the checkboxes to the array, it just prints array and goes not further.
Here is my code beloe
<?php
$id_number = array($_POST['multi_delete']);
foreach ( $id_number AS $a )
{
// Do database delete using id from array
// DELETE * FROM ............ WHERE id=$a;
}
?>
<form method="post" action="">
<input type="checkbox" name="multi_delete[]" value="1">
<input type="checkbox" name="multi_delete[]" value="2">
<input type="checkbox" name="multi_delete[]" value="3">
<input type="checkbox" name="multi_delete[]" value="4">
<input type="submit" name="multi_delete" value="Delete Multiple Items">
</form>