Hey Xeno, the code worked right, the checked box stayed checked but when the update first occurs with the checked value, when u uncheck the value, it does not update after resubmitting. Do I need to include another if in the Update value or what? The code below is a continuation from the previously posted problem with checkboxes!
<?
//if the data gets posted, set the ID row to the checkboxes
if (isset($_POST['id']))
{
$checkboxofid = sizeof($_POST['id']);
//count the variables
$updated = 0;
$inserted = 0;
for ($ii=0;$ii<$checkboxofid; $ii++)
{
$queryupdate = 'UPDATE users SET excludeFromD = 1 WHERE userID = '.$_POST['id'][$ii];
$result3 = $db->query($queryupdate);
//echo $queryupdate, "<br>";
$updated++;
}
echo "<BR />".$updated." account(s) updated (excluded from designs only)<br /><br />";
}
?>