This is in a loop that draws checkboxes and assigns the checked value to $hd_cat_id based on the information it pulls from the category HD. There could be anywhere from 1 to 20 or more boxes. It' all depends on how many categories are entered into the HD.
Code: Select all
print "$default_right_line<input name="cat_check[]" type="checkbox" value="$hd_cat_id">Check to Allow</font></font></font></div></td>";Code: Select all
for ($counter = 1; $counter <= $total_count; $counter++)
{
$cat_check[$counter]=(bool)(isset($_POST['cat_check'][$counter]));
print "$counter - $cat_check[$counter] .. ";
}
die();If I select all the boxes then the output is something like this
1 - 1 .. 2 - 1 .. 3 - 1
But the data that's stored in $cat_check[$counter] (the hd_cat_id) isn't 1. At least not for all the fields, maybe one of them is.
It should look something like:
1 - 1 .. 2 - 4 .. 3 - 10.. where the second number is the hd_cat_id.
Any suggestions would be helpful.