php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #303 $querystring used in docs instead of $QUERY_STRING
Submitted: 1998-04-22 20:14 UTC Modified: 1998-04-25 13:24 UTC
From: mark at shelfspace dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 3.0 Release Candidate 4 OS: n/a
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mark at shelfspace dot com
New email:
PHP Version: OS:

 

 [1998-04-22 20:14 UTC] mark at shelfspace dot com
In http://www.php.net/distributions/bigmanual.html
there is a section which describes how to break up
a query string.  It looks like this:
 
$a = split ('&', $querystring);
$i = 0;
while ($i < count ($a)) {
  $b = split ('=', $a [$i]);
  echo 'Value for parameter ', htmlspecialchars (urldecode ($b [0])),
       ' is ', htmlspecialchars (urldecode ($b [1])), "<BR>";
  $i++;
}

This won't work (I discovered after much head banging)
unless you change $querystring to $QUERYSTRING.

mark

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-25 13:24 UTC] zeev
I think the intention is that $querystring is any
HTTP-like query string, and not necessarily the
environment variable $QUERY_STRING
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC