Re: how to create multiple selects within php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



bruce wrote:
hi...

i can create a form with a single select by something like:

<form>
<select name='foo'>
<option val='1'>fff</option>
<option val='2'>aaa</option>
</select>
<input >
</form>

however, i need to know how to create a multiple menu/list within a single
form.

Not sure exactly what you're asking here, but I think this may be it...

If you want multiple select, you need your select tag to look as such...

<select name="foo[]" multiple>

On the page that the form is submitted too, the selections will be in an array ($_POST['foo']).

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@xxxxxxxxxxxx

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux