[PHP] Re: multiple select box not showing values

2003-07-08 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] 
says...
 I have a select box that is filled with multiple values and when the user
 clicks submit, it hightlights all the values in the select box and then
 sends this to my PHP file.
 
 I did a simple:
 
 echo ($_POST[imgList]);
 
 to see what was happening and the only value being carried across is the
 last value selected, even though all values are selected.  What might be
 causing only the last value to be chosen?  I was thinking that it was some
 of the javascript that I use but I recall that it was working just fine with
 it.  I've even tried removing the JS with the same results.  Any ideas.
 
 thanks

You need to name the SELECT as imgList[] which will pass an array of all 
the selected items to your script.

-- 
Quod subigo farinam

$email =~ s/oz$/au/o;


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: multiple select box not showing values

2003-07-08 Thread Micah Montoy
I can't believe I totally overlooked that.  Thanks.  That solved the problem
completely.


David Robley [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 In article [EMAIL PROTECTED], [EMAIL PROTECTED]
 says...
  I have a select box that is filled with multiple values and when the
user
  clicks submit, it hightlights all the values in the select box and then
  sends this to my PHP file.
 
  I did a simple:
 
  echo ($_POST[imgList]);
 
  to see what was happening and the only value being carried across is the
  last value selected, even though all values are selected.  What might be
  causing only the last value to be chosen?  I was thinking that it was
some
  of the javascript that I use but I recall that it was working just fine
with
  it.  I've even tried removing the JS with the same results.  Any ideas.
 
  thanks

 You need to name the SELECT as imgList[] which will pass an array of all
 the selected items to your script.

 -- 
 Quod subigo farinam

 $email =~ s/oz$/au/o;




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php