Re: Multiple value selection box (mix php/html problem) returning only one value

From: Date: Tue, 22 May 2001 20:07:40 +0000
Subject: Re: Multiple value selection box (mix php/html problem) returning only one value
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-7845@lists.php.net to get a copy of this message
I'm not to clear on exactly what you meant. What I tried with your code was to add these lines print "</select></center>"; print "<script language=javascript>"; print " document.frmForm.earnType.name = \"earnType[]\" "; print "</script>"; prior to my submit button print "<br><center><input type = \"submit\" value =\"Submit\"></center>"; I still get a single value returned. Vasu Gokaraju wrote:
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[]
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@
-- 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.
-- 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

« previous php.windows (#7845) next »