Know which POST (or GET) method variables are available with php
Very easy script for a very important need: handle all variables coming with POST or GET methods.
With this script you can manage all data coming for every kind of form.
PHP:
-
<?php
-
foreach ($_POST as $varname => $varvalue) {
-
echo "$varname -> $varvalue<br>";
-
}
-
?>
This script prints all passed variables with their values.
There is nothing more to say, just remember that changing $_POST with $_GET you will list all GET variables instead of POST ones.
Improve the blog rating this post
Tell me what do you think about this post. I'll write better and better entries.
Tell me what do you think about this post. I'll write better and better entries.
One Response to “Know which POST (or GET) method variables are available with php”
Leave a Reply

hi Emanuele ,
thanks for ur code, i have completed my task with ur small code but effective. ok have a beer(brand ur wish)on my name :)
once again thanx
VENKATA