Re: getting values from multiple select
| From: | Scott St. John | Date: | Thu, 14 Mar 2002 14:33:37 +0000 |
| Subject: | Re: getting values from multiple select | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88502@lists.php.net to get a copy of this message | ||
Yes, I have tried that. To view them on the next page I would call
them as $choice[0];$choice[1];, etc, but only the first item in the list
is available.
-Scott
On Thu, 14 Mar 2002, Erik Price wrote:
> Did you try putting brackets at the end of the input names? This tells
> PHP to put the values into an array, whose key is the name of the input.
>
> <select name="choice[]" multiple="yes">
> <option value="a">A</option>
> <option value="b">B</option>
> <option value="c">C</option>
> </select>
>
> This might work for you,
>
>
> Erik
>
>
>
>
> ----
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> pricee@hhbrown.com
>
--