Re: Re: passing values of checkboxes in PHP
| From: | John Taylor-Johnston | Date: | Mon, 17 May 2004 17:59:58 +0000 |
| Subject: | Re: Re: passing values of checkboxes in PHP | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186417@lists.php.net to get a copy of this message | ||
> > <input type=\"checkbox\" Name=protid1 value=\"$variable\">
> > <input type=\"checkbox\" Name=protid2 value=\"$variable\">
> > <input type=\"checkbox\" Name=protid3 value=\"$variable\">
> > <input type=\"checkbox\" Name=protid4 value=\"$variable\">
> >
>
> Or give all name="protid[]" and you will get array $_POST['protid'] that
> you can loop over.
Do it like this or you will have the same problem.
name="protid[0]"
name="protid[1]"
name="protid[2]"
--
John