Faisal Jamil
Answered On : Dec 27th, 2011
Code
<?php
foreach ( $_GET as $key => $value )
{
echo "$key : $value <br>";
}
?>
Same code works equally for $_POST, depending on the method of HTML form. e.g.
Code
<form action="" method="get">
<input name="username" type="text" />
<input name="password" type="text" />
<input type="submit"/>
</form>

1 User has rated as useful.
Login to rate this answer.
Tim Huff
Answered On : Jan 31st, 2012
Just iterate across the POST and GET globals
Code
";
foreach($_POST as $key=>$value)
";
";
foreach($_GET as $key=>$value)

2 Users have rated as useful.
Login to rate this answer.
Karthick
Answered On : Apr 28th, 2012
use $_REQUEST
Code
<?php
foreach ( $_REQUEST as $key => $value )
{
echo "$key : $value <br>";
}
?>

1 User has rated as useful.
Login to rate this answer.
Code
<?php
foreach ($_GET as $key => $value)
{
}
?>
Login to rate this answer.
Login to rate this answer.