Possibly more of an html question, but...

From: Date: Mon, 03 Jul 2000 21:28:59 +0000
Subject: Possibly more of an html question, but...
Groups: php.general 
Request: Send a blank email to php-general+get-4578@lists.php.net to get a copy of this message
...I'll give it a go here and hope nobody strings me up. The html tag <select> has an option "multiple", meaning that you can select more than one option. The <select> tag has the "name" attribute and the enclosed <option> tags have the "value" attributes. I'll give a slight example describing my problem: --- <select name="select_test" multiple> <option value="selection_1">Number 1 <option value="selection_2">Number 2 <option value="selection_3">Number 3 ... <option value="selection_n">Number n </select> --- Here, you'll get a selection box where you can select as many options as you'd like. That's html. The php (and as far as I can see without having tried it, also cgi) related problem is that when I try to pick up these values in a variable in a script, I only get the last value, as I can see, the following happens in php: --- $selection_test = Number 1; $selection_test = Number 2; $selection_test = Number 3; ... $selection_test = Number n; --- meaning that $selection_test is over-written each time you read a new value. I've also tried handling $selection_test as an array, but if I understand this correctly, it isn't one. Surely there must be a solution to this as I've seen multiple selection boxes being used, but whatever this solution is, it's bypassed me. Does anybody know how to deal with this? --Fredrik

« previous php.general (#4578) next »