Re: Multiple selections

From: Date: Wed, 13 Nov 2002 00:34:45 +0000
Subject: Re: Multiple selections
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-124116@lists.php.net to get a copy of this message
At 01:37 13.11.2002, Todd Cary said: --------------------[snip]-------------------- >I have a pull-down with the MULTIPLE attribute. If the Form is of Type >GET and two values are selected (e.g. select1 and select2), I see in the >URL the following: > >?myvar=select1&myvar=select2 > >"myvar" appears twice, however, if I check the $HTTP_GET_VARS, I only >have one value: myvar=select2. > >Is it possible to get both values? --------------------[snip]-------------------- Sure it is - just name the listbox control "myvar[]" (note the angle brackets). PHP will recognize this being an array, and you'll end up with $myvar = array('select1','select2'); -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/

« previous php.general (#124116) next »