note 61771 added to reserved.variables
| From: | geza at turigeza dot com | Date: | Sat, 11 Feb 2006 13:13:45 +0000 |
| Subject: | note 61771 added to reserved.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-103503@lists.php.net to get a copy of this message | ||
Above the manual says
'$_REQUEST is an associative array consisting of the contents of $_GET, $_POST, and
$_COOKIE.'
However
$_REQUEST doesn't always contain the same elements as
$_GET+$_POST+$_REQUEST;
Basically if you add an element to the $_POST array that element does not automatically get added to
REQUEST as well. It's easy to understand why :)
<?php
$_POST['geza'] = 'geza';
$_GET['bela'] = 'bela';
echo '<pre>';
print_r($_POST);
print_r($_GET);
print_r($_REQUEST);
echo '</pre>';
?>
will output this
Array
(
[geza] => geza
)
Array
(
[bela] => bela
)
Array
(
)
----
Server IP: 84.18.202.180
Probable Submitter: 82.41.4.183
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61771
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61771&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61771&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61771&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61771&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61771&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61771&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61771&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61771&report=yes
Search -- http://master.php.net/manage/user-notes.php