$_SERVER
contains server variables, that is, things like the operating system, the referrer URL, paths to various folders on the server.
What you're looking for instead is either the $_POST
array, the $_GET
array, or the $_REQUEST
array. I might be stating the obvious here, but here's what they contain:
-
$_POST
contains a list of all variables POSTed to the script.
-
$_GET
contains a list of all variables in the query string (eg: someScript.php?x=1&y=2
)
-
$_REQUEST
contains a merge of $_POST
, $_GET
and $_COOKIE
(usually in that order). I don't recommend using this: you should know the methods you're using to get variables into your script and use that array specifically.
In your case, you need to take a look at the $_POST
array. It's always handy to run this once:
print_r($_POST);
This will show you everything posted to that page.