note 47965 added to function.import-request-variables
| From: | brian at enchanter dot net | Date: | Tue, 07 Dec 2004 13:19:18 +0000 |
| Subject: | note 47965 added to function.import-request-variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-81487@lists.php.net to get a copy of this message | ||
import_request_variables does *not* read from the $_GET, $_POST, or $_COOKIE arrays - it reads the
data directly from what was submitted. This is an important distinction if, for example, the server
has magic_quotes turned on and you massage the data to run stripslashes on it; if you then use
import_request_variables, your variables will still have slashes in them.
In other words: even if you say $_GET=""; $_POST=""; then use
import_request_variables, it'll still get all the request data.
If you change the contents of $_GET and you then want to bring this data into global variables, use
extract($_GET, EXTR_PREFIX_ALL, "myprefix") instead.
----
Manual Page -- http://www.php.net/manual/en/function.import-request-variables.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47965
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47965&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47965&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47965&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47965&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47965&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47965&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47965&report=yes
Search -- http://master.php.net/manage/user-notes.php