Posted by Kimmo Laine on 12/18/70 11:50
"dude" <dude.j@gmail.com> wrote in message
news:e6u5nn$3g3$1@ss408.t-com.hr...
> i'll try to be short ... i have this in html :
>
> <select name="OS[]" size="5">
> <option value="0" selected>Please select one or more...</option>
> <option value="1">Windows</option>
> <option value="2">Mac OS X</option>
> <option value="3">Linux</option>
> </select>
>
> and i want to echo the values from this simple list (OS), i mean array
> from $_GET array ...
>
> i did this:
>
> foreach($_GET as $i => $val)
> echo $i . ": " . $val . "<br>";
try:
foreach($_GET['OS'] as $i => $val)
echo $i . ": " . $val . "<br>";
By the way, I think you're missing the attribute MULTIPLE from the select if
you want to be able to select multiple items. It should be
<select name="OS[]" size="5" multiple>
or if you're using xhtml,
<select name="OS[]" size="5" multiple="multiple">
--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
spam@outolempi.net | Gedoon-S @ IRCnet | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|