I am trying to get the values of selected check boxes within a form however I need to store an array within the value tag which holds an ID and the Day.
Something like so:
echo '<label><input type="checkbox" name="check_list[ind]" id="'.$ind['ID'].'" value="'.$valueArr[$ind['ID']]['Fri'].'">Friday</label>';
echo '<label><input type="checkbox" name="check_list[grp]" id="'.$ind['ID'].'" value="'.$valueArr[$ind['ID']]['Sat'].'">Sat</label>';
if (isset($_POST['check_list'])){
$indchks = $_POST['check_list']['ind'];
$grpchks = $_POST['check_list']['grp'];
$G = count($grpchks);
$N = count($indchks);
for($i = 0; $i < $N; $i++){
//Need to somehow delve into the value array?
//insertIndBooking($talent_id, $id, $day);
}
These values will later have to be read and posted to a DB. My problem being, I am not so certain what I am doing is correct or how I am going to read this array.
Any and all help is gratefully received
Kind Regards,