Re: [PHP-DB] Passing multiple form variable in PHP
using the [] makes your variable an array when it comes into php. **snip** else { print ' Multiple Check: False True '; } **snip** "Stephen Rhodes" cc: Subject: [PHP-DB] Passing multiple form variable in PHP 11/12/2002 11:31 AM HELLO - this is probably a simple problem !! Wanting to use in a html form and pass multiple value into a php variable but does not work. I only get a single value. Can you tell me what I am doing wrong ? Does the multiple value get passed correctly in php if ($task=="check") { printf("$icon"); } else { print ' Multiple Check: False True '; } Thanks Steve R -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Passing multiple form variable in PHP
I'm pretty sure all you have to do is name your select as an array like so: Your selected values will come across as an array called $icon. If you need more info on this and how to use it, there's lots in the archives. That's where I found the info I needed. Good luck. Rich > -Original Message- > From: Stephen Rhodes [mailto:stephen.rhodes@;scils.co.uk] > Sent: Tuesday, November 12, 2002 11:32 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Passing multiple form variable in PHP > > > HELLO - this is probably a simple problem !! > > Wanting to use in a html form and pass > multiple value > into a php variable but does > not work. I only get a single value. Can you tell me what I > am doing wrong > ? > > Does the multiple value get passed correctly in php > > if ($task=="check") > { > printf("$icon"); > } > else > { > print ' action="test.php?task=check"> > Multiple Check: > > False > True > > border=0>'; > } > > Thanks > Steve R > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Passing multiple form variable in PHP
> -Original Message- > From: Stephen Rhodes [mailto:stephen.rhodes@;scils.co.uk] > Sent: 12 November 2002 16:32 > > Wanting to use in a html form and pass > multiple value > into a php variable but does > not work. I only get a single value. Can you tell me what I > am doing wrong > ? You're not telling PHP to expect multiple values -- this is done by putting array brackets [] on the end of the field name. > > Does the multiple value get passed correctly in php Yes. > Needs to be: and $_POST['icon'] will be an array of the selected values. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php