Re: Multiple value selection box (mix php/html problem) returning only one value
| From: | Vasu Gokaraju | Date: | Tue, 22 May 2001 18:45:45 +0000 |
| Subject: | Re: Multiple value selection box (mix php/html problem) returning only one value | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-7841@lists.php.net to get a copy of this message | ||
I think we can handle this by changing the element name before you submit the form.
For example, you have a select box like:
<select name=selTest>
<option>Value1
<option>Value2
</select>
before you submit the form, change the <select> tag name like this
<script language=javascript>
document.frmForm.selTest.name = "selTest[]";
</script>
It worked for me with multiple check boxes.
Vasu
From: Michael Kelley <mkelley@nmsu.edu>
To: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Multiple value selection box (mix php/html problem) returning only one value
Date: Tue, 22 May 2001 12:20:16 -0600
Sorry Matt,
That returns
Key: 0, Value: Array
If you don't mind, point out the suspect HTML
Matt Williams wrote:
Hi Michael Sorry brain fade Try changing your selectname to earnType[]-- Michael Kelley mkelley@nmsu.edu Programmer/Systems Analyst I New Mexico State University Information and Communication Technologies Work # (505)-646-1374 P.O. Box 30001 MSC: 3AT Las Cruces, NM 88003 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net For additional commands, e-mail: php-windows-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.print "<center><select name = \"earnType\" multiple size = \"10\">";print "<center><select name = \"earnType[]\" multiple size = \"10\">";Also I don't know if that's all your code but there is some suspect html in there M@