PHP provides you “super-global” variables. These include $_GET, $_POST, $_COOKIE, $_SESSION, $_SERVER, $_ENV, $_FILES and $_REQUEST. Most of these are fairly self-explainatory. $_GET are the variables passed by forms with a
GET
method or after the end of the path such asexample.com/search.php?GETARG1=GETVAL1&foo=bar
. $_POST is any variable submitted by a form with methodPOST
. $_COOKIE is full of cookies setup by your PHP script. $_FILES is full of any uploaded files submitted through a form with enctypemultipart/data
and methodPOST
. $_SESSION are variables you have set and committed to the session. $_ENV are environment settings from the operating system. $_SERVER are variables set up by Apache. They’re all fairly self explainatory.Except $_REQUEST.
$_REQUEST seems sporadic. Sometimes it matches $_POST, sometimes $_GET, sometimes it seems to pick and choose.
http://www.alternateinterior.com/2007/01/what-is-_request.html