Hi
What I'm trying to do is use checkboxes to select individual rows for multiple updates into a table.
Only the last row on the list is executing in the SQL update.
Something strange is going on...
For example... Let's say I have 4 rows of output on page 1. If I check all four rows with a checkmark it echoes out on page 2 correctly. If I skip a row and check the first, third and fourth rows it echoes the first three rows. If the third and fourth rows checked it echoes the first two rows out.
The code I'm using on the second page is...
$numrows = count ($check);
for($i=0;$i<sizeof($check);$i++) {
echo "$check[$i]<br>";
echo "$date[$i]<br>";
echo "$zone[$i]<br>";
$sql = "update assign set truck_no = '', driver = '', date_last_visited = '$date[$i]', current_status = 'off' where zone = '$zone[$i]'";
}
I'm out of ideas. Thank you for any help.
Richard
What I'm trying to do is use checkboxes to select individual rows for multiple updates into a table.
Only the last row on the list is executing in the SQL update.
Something strange is going on...
For example... Let's say I have 4 rows of output on page 1. If I check all four rows with a checkmark it echoes out on page 2 correctly. If I skip a row and check the first, third and fourth rows it echoes the first three rows. If the third and fourth rows checked it echoes the first two rows out.
The code I'm using on the second page is...
$numrows = count ($check);
for($i=0;$i<sizeof($check);$i++) {
echo "$check[$i]<br>";
echo "$date[$i]<br>";
echo "$zone[$i]<br>";
$sql = "update assign set truck_no = '', driver = '', date_last_visited = '$date[$i]', current_status = 'off' where zone = '$zone[$i]'";
}
I'm out of ideas. Thank you for any help.
Richard