Hi all,
The below loop will only process one checkbox at a time. Why is this?
foreach($completed as $k => $v)
{
echo $k .' => '.$v;
echo '<br />';
$query = "update test set completed = 'Yes' where number = '$v' and course_ID = '$k'";
$result = mysql_query($query) or die(mysql_error());
print_r($_POST['completed']);
}
Here's the checkbox(multiple checkboxes on one page)...
echo '<input type="checkbox" name="completed['.$row['course_ID'].']" id="completed" class="box" value="'.$row['number'].'" />';
Any ideas?
Thanks.