Re: List Boxes
| From: | Andy Woolley | Date: | Fri, 28 Jul 2000 13:57:28 +0000 |
| Subject: | Re: List Boxes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8782@lists.php.net to get a copy of this message | ||
You will need to set up a form variable as an array
When setting up the list box do somethin like this:
<select size=5 multiple name=selector[]>
<option value='value1'>Value1</option>
<option value='value2'>Value2</option>
<option value='value3'>Value3</option>
<option value='value4'>Value4</option>
<option value='value5'>Value5</option>
To display the selected values after submit do this:
<?
while (list ($key, $val) = each ($selector))
{
echo $val;
}
?>
Hope this helps
Andy.
Hi
I wonder how to get selected items values from List Box (multiple)?
I need to insert them into db.
Thanks
--
Jacek Stachowicz
jacek@atra.com.pl
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net