Re: Forms, Option Select handling a choice?
| From: | Kamil Nowicki | Date: | Thu, 11 Oct 2001 18:06:01 +0000 |
| Subject: | Re: Forms, Option Select handling a choice? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70837@lists.php.net to get a copy of this message | ||
> How do you handle a choice from a users <option> within select of a
> form?
>
> I just need it to shoot out a simple string for each option to an email.
Try:
<SELECT NAME="some_name[]" MULTIPLE>
<OPTION VALUE="first_val">First</OPTION>
<OPTION VALUE="second_val">Second</OPTION>
...
</SELECT>
And on the script that recieves data from the form the select was in, You
get array $some_name indexed from 0 with select values (only those
which have been selected).
I didn't tested it, but it works with multiple checkboxes so I suppose that
the rule is the same.
Kamil
'Hilarion' Nowicki