RE: [PHP] Request form duplicate names
| From: | Wouter van Vliet | Date: | Fri, 19 Dec 2003 12:21:41 +0000 |
| Subject: | RE: [PHP] Request form duplicate names | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173009@lists.php.net to get a copy of this message | ||
<input type='checkbox' name='id[]' value='1'>
:P
On vrijdag 19 december 2003 11:10 Frédéric HARDY told the butterflies:
> Try <input type'checkbox' name='id[]' value='1'>
>
> So in your script :
>
> $ids = $POST['name'];
> $first_id = $POST['name'][0];
>
> Best regards, Fred
> ===================================================================
> Frederic HARDY Email: fch@hexanet.fr
> HEXANET SARL URL:
> http://www.hexanet.fr/
> ZAC Les Charmilles Tel: +33 (0)3 26 79 30 05
> 3, allée Thierry Sabine Direct: +33 (0)3 26 61 77 84
> BP 202 - 51686 REIMS CEDEX 2 FRANCE
> ===================================================================
>
> ----- Original Message -----
> From: "Terence" <terence@sunway.edu.my>
> To: <php-general@lists.php.net>
> Sent: Friday, December 19, 2003 10:41 AM
> Subject: [PHP] Request form duplicate names
>
>
> >
> > Dear All,
> >
> > Is there a way to request form fields which have the same name
> > using POST?
> >
> > I generate dynamic checkboxes all with the same name, but with
> > different values
> >
> > <input type'checkbox' name='id' value'1'>
> > <input type'checkbox' name='id' value'7'>
> > <input type'checkbox' name='id' value'78'>
> > etc
> >
> > I could alternatively do it through GET and split the querystring,
> > but i'd prefer POST.
> >
> > Thanks
> > Terence
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php