"Natasha" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi,
>
> i want to know how i can get all selected values of a multiple select
statement using $HTTP_POST_VARS

The name of your select must be an array, ie

<select name='myvar[]' multiple>
    <option>A
    <option>B
    <option>C
</select>

If A and B are selected, you will get $myvar[0] = 'A' and $myvar[1] = 'B'
(for example).

The safe way to enumerate the values is with foreach, ie

foreach($myvar as $val) {
  // do something with $val
}

Hope this helps.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to