Re: Multple Form Values with Same Name
| From: | Marco Tabini | Date: | Fri, 08 Nov 2002 01:46:27 +0000 |
| Subject: | Re: Multple Form Values with Same Name | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-123294@lists.php.net to get a copy of this message | ||
Yeah, PHP can do that for you. All you need to do is add the array
indicator at the end of the variable name in your HTML code:
<input type="checkbox" name="Suffix[]">
That should make your PHP variable an array.
Marco
Marco
-------------
php|architect -- The Monthly Magazine For PHP Professionals
Come visit us on the web at http://www.phparch.com!
On Thu, 2002-11-07 at 20:50, PHP Mailing List wrote:
> I'm working on converting a pre-existing website for a company, from
> something called Lasso, into PHP. This domain name registration site uses
> the same form value, "$Suffix" as the checkbox values for all the TLDs
> they offer.
>
> I was originally under the impression PHP would put them all into an
> array, $Suffix[0] $Suffix[1] etc... I assumed it, but never tried it cuz I
> didnt need to till now. Is this the way it's suppose to be, or is it
> returned another way? Right now, $Suffix returns the value of only one of
> the checkboxes (the last one in the queries list I assume).
>
> ~Tim
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>