danielking
04-26-2003, 11:11 PM
<select name=a multiple>......
i changed the method to "get", and "a=1&a=2&a=3" displayed in the address bar of IE after the form submitted, the script "echo $_GET['a']" only dispalyed 3.
how can i get all the values i have selected?
CreativeLogic
04-27-2003, 10:25 PM
You assign 1 to a then 2 to a then 3 to a. That is why you only get 3... You will either have to use different variables or seperate the results by a comma or something similar to that.
ilyash
04-28-2003, 10:31 PM
this is how it will work:
a=1;
//here a = 1
a=2;
// here a =2
a=3;
//here a=3
in the end as you could see a =3 (not 2 or 1)
make it like a =1 b=2 c =3
then you could do it
CreativeLogic
04-28-2003, 11:28 PM
Let us know if you need anymore help... That should help more... ilyash explained it a bit better than I did!
garrence
05-01-2003, 05:06 PM
Originally posted by danielking
<select name=a multiple>......
how can i get all the values i have selected? <select name="a[]" multiple>
The square brackets make 'a' an array and you will then get an array back of all selected values.