From: "Jeff McKeon" <[EMAIL PROTECTED]>

> Is it possible to have a form "Drop down box" that allows multiple
> selects?  I know the form field itself exists, but It only seems to
> return the last item selected and not all of them.
>
> Note in the code below the line: <select size="1" name="D1" multiple>

This is the expected behavior. You're passing a bunch of "D1" variables in
the form data, each one overwriting the other in the $_POST array.

What you need to do is name you select element as an array.

<select size="1" name="D1[]" multiple>

Now $_POST['D1'] will be an array of all the items that were chosen.

---John Holmes...

ps: wouldn't it be easier to select multiple items if you had a size larger
than "1"??

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

Reply via email to