Re: how to read the value of the select when use the MULTIPLE method
| From: | David Robley | Date: | Fri, 12 Oct 2001 07:37:45 +0000 |
| Subject: | Re: how to read the value of the select when use the MULTIPLE method | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70890@lists.php.net to get a copy of this message | ||
On Fri, 12 Oct 2001 17:04, jakry wrote:
> how to read the value of the select when use the MULTIPLE method
>
> like
> <SELECT NAME="what-to-do" MULTIPLE SIZE=10>
> <OPTION VALUE="drink">Drink Coffee
> <OPTION VALUE="read" SELECTED>Read A Book
> <OPTION value=walk>Take A Walk
> <OPTION> Chop Down Rainforests
> <OPTION> Buy A Bagel
> <OPTION>Watch TV
> <OPTION>Sell Art
> <OPTION>Buy Jewelry
> <OPTION>Attend A Concert
> <OPTION>Read Poetry
> <OPTION>Exercise
> <OPTION>Whittle
> <OPTION>Cook Stir Fry
> <OPTION>Sip Espresso
> <OPTION value="Pig Out">Munch Teddy Grahams
> </SELECT>
>
> when i select two value..well after submit
> i just can read the last value...
> so how i can read the all value where i have select
> thank
Set the name of the SELECT as an array; NAME="what_to_do[]"
Then loop through the array $what_to_do.
--
David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA
Drawing on my fine command of language, I said nothing