I would like to get and display all the variable names that are submitted method="post"on the form. I do not know the variables that are passed from the post method to HTML. Is there a way to list all the variables sent by the post method? .. Thanks in advance.
method="post"
Example: http://www.dhamu.in/oncreate2.php?workload=10&request_type=project&name=web%20design&description=we%20have%20done%20it&budget=1&bidperiod=11&project_guidelines=checked&job_113=1&xxxx=10 I have no name xxxx "
foreach ($_POST as $key => $value){ echo "{$key} = {$value}\r\n"; }
BTW, $_GET ( , foreach ($_GET as $key => $value){.) $_REQUEST , .
$_GET
foreach ($_GET as $key => $value){
$_REQUEST
Try:
print_r(array_keys($_POST))
... .
:
print_r($_POST)
... POST.
To display all POST variables, try the following:
var_dump($_POST);
The variables that are included in the URL are actually GET variables:
var_dump($_GET);