php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24246 Missing $_GET variables
Submitted: 2003-06-18 10:23 UTC Modified: 2003-06-18 11:40 UTC
From: sdrost at graebel dot com Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 4.3.1 OS: Windows 98
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sdrost at graebel dot com
New email:
PHP Version: OS:

 

 [2003-06-18 10:23 UTC] sdrost at graebel dot com
Description:
------------
When using the GET method from a form, if you have a SELECT type input that can multi select, only one selection gets inserted into the $_GET array.

try this:
echo.php?D1=PK&D2=TUTR&D2=TUWH&D2=BEPK

Reproduce code:
---------------
<HTML>
<HEAD>
<TITLE>GET Method Echo page</TITLE>
</HEAD>
<BODY>
<?
printf ("%s<BR>\n<HR>\n", getenv("HTTP_REFERER"));

printf("<pre>");
var_dump ($_GET);
$a = explode("&",$_ENV["QUERY_STRING"]);
var_dump ($a);
printf("</pre>");
?>
</BODY>
</HTML>

Expected result:
----------------
array(4) {
  ["D1"]=>
  string(2) "PK"
  ["D2"]=>
  string(4) "TUTR"
  ["D2"]=>
  string(4) "TUWH"
  ["D2"]=>
  string(4) "BEPK"
}


Actual result:
--------------
array(2) {
  ["D1"]=>
  string(2) "PK"
  ["D2"]=>
  string(4) "BEPK"
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-18 11:40 UTC] philip@php.net
This is expected behavior, see:
http://www.php.net/manual/en/faq.html.php#faq.html.select-multiple

However, rumor has it that parse_url() will be given the ability to parse same name variables into an array...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC