while ($div=mysql_fetch_array($query4, MYSQL_ASSOC)) {
//$div - shows all the entries
$row22=mysql_fetch_array($query2, MYSQL_ASSOC);
//row22 - shows all the entries that should be checked
$name= array($div['date_id']);
$datess=$row22['date_id'];
if (in_array($datess, $name, true)) {
echo '<input type="checkbox" value="' . $div[date_id] .'" checked>' . $div[date] . '</option>';
}else{
echo '<input type="checkbox" value="' . $div[date_id] .'">' . $div[date] . '</option>';
}
1. when echo $row22 shows only the entries that should be checked - working good
2. checkboxes show checked if only the first checkbox is selected or all 3 - if a combination is selected, it is all blank.
notes:
$query2 checks which checkboxes the user has selected
wants to verify it against all the checkboxes in $query4
than mark $query2 checkboxes as checked.
Any ideas appricated
Thank you
isaiaha is online now Flag Post Reply With Quote