I am trying to deal with Cancellations in a hotel reservations system and I am filtering down the specific reservation via Last name and Arrival Date. thats all fine until I come to a person who has made 2 reservations for the same day, but only wants to cancel one. So I have put in checkboxes next to the reservation details so I can delete the relevant one...but how do I loop through the checkboxes to delete the relevant reservation?
What I have so far is:
the sql statement:
$sqlcancel = "SELECT reservation.Reservation_ID, reservation.Customer_ID, customer.First_name,
customer.Last_name, reservation.Arrival_Date,reservation.Dept_Date,reservation.Room_no FROM reservation, customer WHERE reservation.Customer_ID = customer.Customer_ID AND $Arrival_Date = reservation.Arrival_Date
AND '$Last_name' = customer.Last_name";
and then further down:
while ($row=mysql_fetch_array($result)){
$Reservation_ID = $row["Reservation_ID"];
$Customer_ID = $row["Customer_ID"];
$First_name = $row["First_name"];
$Last_name = $row["Last_name"];
$Dept_Date = $row["Dept_Date"];
$Room_no = $row["Room_no"];
echo"<TR><TD><CENTER><INPUT TYPE=\"checkbox\" NAME=\"del[]\">
</CENTER></TD>";
echo"<td>$Reservation_ID</td><td>$Customer_ID</td><td>$First_name</td><td>$Last_name</td>
<td>$Arrival_Date</td><td>$Dept_Date</td><td>$Room_no</td></tr>";
}
Any help here would be great, I've looked up the topic and haven't come up with anything really. Thanks :-)