Name your select element "majors[]" and when the form is submitted, your
form handler will get an array, not a scalar, called $majors.  Step
through the array, and you'll get all the options that were selected.

        ~Chris                         /"\
                                       \ /     Microsoft Security Specialist:
                                        X      The moron in Oxymoron.
                                       / \     http://www.thebackrow.net

On Fri, 12 Apr 2002, Brian McLaughlin wrote:

> I have a tag like this on a php-generated web page.
>
> <select name=majors multiple size="6">
>   <option value="Art">Art</option>
>   <option value="Biology">Biology</option>
>   <option value="Business and Economics">Business and Economics"</option>
>    etc.
>    etc.
> </select>
>
> My question is...  since this is a multiple-select list, in the php script
> that this form calls on a submit, how do I determine which options have been
> selected?  If I look at $majors, it is a string whose value is one of the
> several options that were selected.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to