Introduction:
To view all of the POST/GET Variables, you could use the
following PHP statements.
NOTE: Make sure that "REGISTER_GLOBALS"
are turned ON and DO NOT USE (enctype="text/plain")
in your form tag or you may not be able to retrieve the
posted values.
print_r($_POST);
?>
or
print_r($_GET);
?>
or you may want to see all POST/GET variables including
global variables like cookies set by your web site.
print_r($_REQUEST);
?>
Here is a sample as to how the data will display after
posting your form by using the above PHP statements:
Array ( [textfield1] => Alexander
[textfield1] => 1 [submit] => Submit )
If you would like to change the way your POST/GET Array
variables are displayed, you could do the following:
echo "POST/GET Variables:
";
foreach ($_GET as $key => $val)
echo "$key =$val
";
?>
The the code above should display something like this:
POST/GET Variables:
textfield =Mike
textfield2 =Tome
textfield3 =Sue
textfield4 =Bob
Submit =Submit
To view a working sample using the GET method, click
here!
NewSourceMedia is providing links to these listings as
a courtesy, and makes no representations regarding the content or
any information related thereto. Any questions, complaints or claims
regarding the downloaded content or details must be directed to the appropriate
publisher. We do not encourage or condone the use of any
software in violation of applicable laws.