Problem in retreving values from more than one multi select in form
| From: | Vishak Tomy | Date: | Fri, 30 Mar 2001 08:22:28 +0000 |
| Subject: | Problem in retreving values from more than one multi select in form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-46242@lists.php.net to get a copy of this message | ||
Hello all,
I have a problem with the multi select, any body please solve this.
In a form there are more than one multi select box, arranged one by
one. Following are the way i created it.
<form ....>
<tr><td>
<input type=text name="user[]" value="user1">
<select name="mselect[]">
<option value="vishak">Vishak</option>
<option value="sujith">Sujith</option>
<option value="rajesh">Rajesh</option>
</select>
</td></tr>
<tr><td>
<input type=text name="user[]" value="user2">
<select name="mselect[]">
<option value="vishak">Vishak</option>
<option value="sujith">Sujith</option>
<option value="rajesh">Rajesh</option>
</select>
</td></tr>
</form>
How coud i get the values of the multi select when I submitted this
form.
For the text area i had taken the values by $user[0], $user[1] etc.
and I got values 'user1', 'user2' etc.
And the problem is how could i get the values of multi select,
I tried it with $mselect[0],$mselect[1] then I got the last selectd
values of the bottom select box.
What I want is, If I selected 2 names from first mselect and 2 from
second mselect, then the values must get in the manner,
first and second name of first select then
first and second name of second select
Regards
Vishak