Re: Passing multiple form variable in PHP

From: Date: Tue, 12 Nov 2002 16:34:04 +0000
Subject: Re: Passing multiple form variable in PHP
Groups: php.db 
Request: Send a blank email to php-db+get-23247@lists.php.net to get a copy of this message
using the [] makes your variable an array when it comes into php. **snip** else { print '<form name="sqlform" method="post" action="test.php?task=check"> <font class="look2">Multiple Check:</font> <select multiple name="icon[]"> <option value="false">False</option> <option value="true">True</option> </select><br><br> <input type="submit" name="submit" value="Submit" border=0></form>'; } **snip** "Stephen Rhodes" <stephen.rhodes@sc To: php-db@lists.php.net ils.co.uk> 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 <select multiple ... > 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 '<form name="sqlform" method="post" action="test.php?task=check"> <font class="look2">Multiple Check:</font> <select multiple name="icon"> <option value="false">False</option> <option value="true">True</option> </select><br><br> <input type="submit" name="submit" value="Submit" border=0></form>'; } Thanks Steve R -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#23247) next »