note 54142 added to ref.url
| From: | dday at cnscorp dot com | Date: | Fri, 24 Jun 2005 17:22:26 +0000 |
| Subject: | note 54142 added to ref.url | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90911@lists.php.net to get a copy of this message | ||
When using a multiple select on a form, I ran into a little issue of only receiving the last value
form the select box.
I had a select box named organization_id with two values (92 and 93).
To get the values of both, I had to use the following:
$temp_array = split("&", $_SERVER['QUERY_STRING']);
foreach($temp_array as $key=>$value){
if(substr($value, 0, 15) == "organization_id"){
$_GET['organizations'][] = substr($value, 15, strlen($value));
}
}
this results in a $_GET array like this :
(
[page] => idea_submission
[organization_id] => 93
[organizations] => Array
(
[0] => =92
[1] => =93
)
)
----
Manual Page -- http://www.php.net/manual/en/ref.url.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54142
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54142&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54142&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54142&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54142&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54142&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54142&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54142&report=yes
Search -- http://master.php.net/manage/user-notes.php