PHP Super Global Variables

PHP super globals are predefined array variables that provide important information about the php running environments and the information of the running php script.

$GLOBALS contains all the global variables. All of the following global variables are elements of $GLOBALS.

$_SERVER contains information about the web server information.

$_REQUEST contains information from user inputs, $_GET, $_POST, $_COOKIE are elements inside it.

$_GET contains information of GET requests from a form submission.

$_POST contains information of POST requests from a form submission.

$_COOKIE contains HTTP cookie information.

$_FILES contains information from POST file uploads.

$_ENV contains information about the script environment.

$_SESSION contains information of any variables registered in a session.

To see all the global variables:

echo "<pre>";
echo var_dump($GLOBALS);
echo "</pre>";

Search within Codexpedia

Custom Search

Search the entire web

Custom Search