Entry
How would I find the variables that were posted from a generic form without knowing the variable names using the post method?
Jun 15th, 2000 02:52
Erik Johansson, Vince Bird, http://www.php.net/FAQ.php#7.1
This will display every item in the form that has the NAME tag set. This
mean that even the submit button will be displayed if named.
$HTTP_POST_VARS depends on track-vars which is enabled at compile time,
or at the top of the PHP script with <?php_track_vars?>. (n.b.
HTTP_GET_VARS, also exists.)
<?php
if(isset($HTTP_POST_VARS))
{
while(list($var, $val) = each($HTTP_POST_VARS))
{
echo "$var<br>";
}
}
?>