Re: Using SELECT and MULTIPLE in a form

From: Date: Sun, 02 Feb 2003 03:44:03 +0000
Subject: Re: Using SELECT and MULTIPLE in a form
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133953@lists.php.net to get a copy of this message
Hi, Sunday, February 2, 2003, 1:29:30 PM, you wrote: JK> I am displaying a form using values obtained from a database query. JK> One of the elements contains about 20 different values. I want the JK> use to be able to select multiple values before pressing submit. JK> This seems to work, but when my php script is called, all I see is JK> the last data value assigned to the variable. I could use a pointer. JK> Here is a code snippet: JK> echo "<TR>\n"; JK> echo " <TD>Task Description</TD>\n"; JK> echo " <TD><SELECT NAME='in_task_descr' MULTIPLE JK> SIZE=4>\n"; JK> for ($j = 0; $j < $tskcount; $j++) { JK> echo "<OPTION JK> VALUE=\"$taskdescr[$j]\">$taskdescr[$j]</OPTION>\n"; JK> } JK> echo " </SELECT>\n"; JK> echo " </TD>\n"; JK> echo "</TR>\n\n"; JK> The above code adds a list to the form and the user can highlight more than one JK> entry. JK> How do I access the data after the user presses submit? JK> -- JK> Jim Kaufman mailto:jmk@linuxforbusiness.net JK> Linux Evangelist cell: 612-481-9778 JK> public key 0x6D802619 fax: 952-937-9832 JK> http://www.linuxforbusiness.net This popped up using google http://www.onlinetools.org/tricks/using_multiple_select.php -- regards, Tom

« previous php.general (#133953) next »