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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Sun Aug 09 18:34:40 2020 UTC