Hi guys I need a little help again.
I have a form that cotains a checkbox with a dynamic name or value ( I’m not sure whats best to use a name or value?)
<?
$cl_query = "SELECT * FROM email_cats ORDER BY cat_id ASC";
$cl_result = mysql_query($cl_query);
while($c_list = mysql_fetch_assoc($cl_result)) {
//echo "<label>" . stripslashes(htmlspecialchars($c_list['cat'])) ."</label><input type=\"checkbox\" value=\"" . $c_list['cat_id'] . "\" name=\"".$c_list['cat_id']."\"/><br />";
echo "<label>" . stripslashes(htmlspecialchars($c_list['cat'])) ."</label><input type=\"checkbox\" value=\"" . $c_list['cat_id'] . "\" name=\"group\"/><br />";
}
?>
As you can see I have the checkbox in a while loop (not sure if thats the best way, but it sort of works).
I just need to create an if statement or something so that I know if the checkbox is ticked/checked. I’ve been trying to do it for a couple of weeks without any luck. Would the if statement have to be in a loop as well or something? I’m not sure. Any help or advice would be really helpful!
Thanks