Hi
What I'm trying to do is use checkboxes to select individual rows for multiple updates into a table.
The situation is...
I make a query and format the output like...
<td><input type='Checkbox' name='check[]'></td>
<input type='text' size='10' name='date[]'></td>
<td align='center'>$n4<input type='hidden' value='$n1' name='zone[]'></td>
Let's say I have 4 rows of output on page 1. If I check the first, third, and fourth row with a checkmark I get the following echoed out ($check[$i] $date[$i] $zone[$i])...
........
(row 1) on
2001-7-6
1
(row 2) on
2001-7-1
2
(row 3) on
2001-7-8
45
(row 4) nothing
........
2 is showing that it's on but it's not and there is another below 45 that is on(checked) but is not showing up.
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