I have read through this and this post, which looks to be the most similar, but it has not solved my problem.
I have the below while loop working to display results from my database. The specific line of question in the while loop is this (note: it is within a form):
while($row = mysqli_fetch_array($result)){
<input type='checkbox' name='check_box_delete[]' value='".$row['BookingNo']."'>
}
The rest of the form data passes through fine except for the checkboxes. In the following php page, I have this:
if(isset($_POST['check_box_delete'])){
foreach($_POST['check_box_delete'] as $id){
$sql="DELETE FROM bookings WHERE BookingNo='".$id."'";
if (!mysqli_query($con,$sql)){
die('Error: ' . mysqli_error($con));
}
echo $id." deleted.";
}
The page echos deleted
but no associated $id. I suspect my processor.php is not getting the booking number at all.