Re: Forms, Option Select handling a choice?
| From: | Pavel Jartsev | Date: | Thu, 11 Oct 2001 18:02:52 +0000 |
| Subject: | Re: Forms, Option Select handling a choice? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70835@lists.php.net to get a copy of this message | ||
Marcus James Christian wrote:
>
> ...
>
> How do you handle a choice from a users <option> within select of a
> form?
>
Same way as other form elements. :)
Use <select name="my_name"> and you got $my_name on PHP-side,
which indicates value of selected <option>.
If you need values of multiple select, then use <select name="my_name[]"
multiple>.
Now $my_name will be array of selected <option>-s.
--
Pavel a.k.a. Papi