Re: POST checkbox group
- From: Richard Walker <toolate@xxxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 13:37:13 +0000
Many Thanks. Easy when you know how!
--
Richard
Michael Fesser wrote:
.oO(Richard Walker).
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>
Use name="days[]". Then $_POST['days'] will be an array, containing the
values of all checked checkboxes.
Micha
- Follow-Ups:
- Re: POST checkbox group
- From: Michael Fesser
- Re: POST checkbox group
- References:
- POST checkbox group
- From: Richard Walker
- Re: POST checkbox group
- From: Michael Fesser
- POST checkbox group
- Prev by Date: Re: POST checkbox group
- Next by Date: Re: POST checkbox group
- Previous by thread: Re: POST checkbox group
- Next by thread: Re: POST checkbox group
- Index(es):
Relevant Pages
|