<input type="checkbox" id="one" name="form[age[]]" value="1"/><label for="one">0 to 12 months</label>
How do I reference the name
in PHP once it has been submitted using POST. I am trying to collect all the checkbox values and then implode age[]
, but I need to put this in a form[]
for form validation.
When i print_r[$_POST['form']['age']
, it displays Notice: Undefined index: age