Posted by Richard Walker on 01/31/07 12:52
Hi
Trying to send the data from a checkbox group to a php process and it's
just sending the last box clicked as a variable, rather than the whole
group as an array. Am I being stupid?
ie html:
<form name="selectform" action="data.php" method="post">
<input name="days" type="checkbox" value="mon" />Mon
<input name="days" type="checkbox" value="tue" />Tue
<input name="days" type="checkbox" value="wed" />Wed
<input type="submit" name="Submit" value="Submit" />
</form>
php:
print_r($_POST["days"])
gives
Array ( [days] => tue [Submit] => Submit )
even when Mon and Tues are checked
Thanks
--
Richard
Navigation:
[Reply to this message]
|