codescracker


php

PHP Predefined Variables



« Previous Tutorial Next Tutorial »


There are large number of predefined variables available in PHP.

PHP Superglobals

The following table lists the PHP superglobals variables:

Variable Meaning
$GLOBALS This variable contains a reference to every variable, which is currently available within the global scope of script.
$_GET This variable is an associative array of the variables passed to the current script via the HTTP GET method
$_SERVER This variable is an array containing the information such as headers, paths, script locations, etc.
$_FILES This variable is also an associative array of items uploaded to the current script via the HTTP POST method
$_POST This variable is also an associative array of variables passed to the current script via the HTTP POST method
$_COOKIE This is an associative array of variables passed to the current script via the HTTP cookies
$_REQUEST This is an associative array consisting of the contents of $_GET, $_POST, and $_COOKIE
$_PHP_SELF This is a string containing the PHP script file name in which it is called
$php_errormsg This is a variable containing the text of the last error message that generated by the PHP
$_SESSION This is an associative array containing the session variables available to the current script

« Previous Tutorial Next Tutorial »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test