Jump to content

Archived

This topic is now archived and is closed to further replies.

Ninjakreborn

superglobals

Recommended Posts

where do I find about superglobals in the manual at
[a href=\"http://www.php.net\" target=\"_blank\"]http://www.php.net[/a]
the following
Name
Functionality

$GLOBALS
Contains all global variables in your script, including other superglobals. This is not generally recommended for use, unless you are, for some reason, not sure where a variable will be stored. $GLOBALS has been available since PHP 3, and its operation has not changed.

$_GET
Contains all variables sent via a HTTP GET request. That is, sent by way of the URL. Users of older PHP versions will recognise this as being the same as $HTTP_GET_VARS array, which, although deprecated, is still available for use.

$_POST
Contains all variables sent via a HTTP POST request. This is similar to the old $HTTP_POST_VARS array, which, although deprecated, is still available for use.

$_FILES
Contains all variables sent via a HTTP POST file upload. This is similar to the old $HTTP_POST_FILES array, which, although deprecated, is still available for use.

$_COOKIE
Contains all variables sent via HTTP cookies. This is similar to the old $HTTP_COOKIE_VARS array, which, although deprecated, is still available for use.

$_REQUEST
Contains all variables sent via HTTP GET, HTTP POST, and HTTP cookies. This is basically the equivalent of combining $_GET, $_POST, and $_COOKIE, and is less dangerous than using $GLOBALS. However, as it does contain all variables from untrusted sources (that is, your visitors), you should still try to steer clear unless you have very good reason to use it. There's no equivalent to $_REQUEST in versions of PHP before v4.1.

$_SESSION
Contains all variables stored in a user's session. This is similar to the old $HTTP_SESSION_VARS array, which, although deprecated, is still available for use.

$_SERVER
Contains all variables set by the web server you are using, or other sources that directly relate to the execution of your script. This is similar to the old $HTTP_SERVER_VARS array, which, although deprecated, is still available for use.

$_ENV
Contains all environment variables set by your system or shell for the script. This is similar to the old $HTTP_ENV_VARS array, which, although deprecated, is still available for use.


Not sure where to find those at in the manual, thanks.

Share this post


Link to post
Share on other sites
Look [a href=\"http://us3.php.net/manual/en/language.variables.predefined.php#language.variables.superglobals\" target=\"_blank\"]here[/a]

But what you wrote is what's in the PHP manual.

Ken

Share this post


Link to post
Share on other sites
thanks I got it off.
[a href=\"http://www.hudzilla.org\" target=\"_blank\"]http://www.hudzilla.org[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.