![]() |
|
|
+ Search |
![]()
|
May 11th, 2002 16:33
Philip Olson, Esben Maaløe, Erik Johansson, Nathan Wallace, Rowel Cox, http://www.php.net/FAQ.php#7.1 http://www.faqts.com/knowledge-base/view.phtml/aid/640/fid/91/lang/
Assuming your form is method="POST" then we can simply do:
<?php
print_r($HTTP_POST_VARS);
?>
It'll show exactly what names/values have been posted. If you're unsure
of the form method, $_REQUEST will work too (introducted PHP 4.1.0), so:
print_r($_REQUEST);
If you simple want to cycle through the variables, consider a while loop
or a foreach statement:
if (count($HTTP_POST_VARS) > 0) {
foreach ($HTTP_POST_VARS as $key => $value) {
print "$key => $value <br />\n";
}
}
Read more about predefined variables here:
http://www.php.net/manual/en/language.variables.predefined.php