I'm population a page with a dynamic number of radio groups. I'm looping through items in a database and giving 3 options for each row
Given I don't know how many rows there will be I can't hard code a check on the input name.
I do however need to check that a selection has been made for each row.
how can I do this?
PHP:
<input type="radio" name="<?php echo $row['id']; ?>_a" value="1">
<input type="radio" name="<?php echo $row['id']; ?>_b" value="1">
<input type="radio" name="<?php echo $row['id']; ?>_c" value="1">
Given I don't know how many rows there will be I can't hard code a check on the input name.
I do however need to check that a selection has been made for each row.
how can I do this?