Re: how to user <select multiple="true">
| From: | Chris Wesley | Date: | Wed, 16 Oct 2002 01:37:07 +0000 |
| Subject: | Re: how to user <select multiple="true"> | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120089@lists.php.net to get a copy of this message | ||
On Wed, 16 Oct 2002, Khalid El-Kary wrote:
> If i have a form that has a <select> with multiple="ture" how would i be
> able to retireve it's multiple values in the PHP script, i tried the
> $_REQUEST['fieldname'] it gave me only the last selected value
You need to make sure you get back an array holding the select element's
data. Do this by naming the select element like this, name="choose[]".
When selecting multiple values, they'll be in the $_REQUEST[choose] array.
See this for an example (I used $_POST instead of $_REQUEST):
http://www.cwwesley.net/code/php/combobox/combobox.php
~Chris