Rate this script:  I Love it  /   I Hate it

PHP GET and POST Variables


Code


$q = explode("&",$_SERVER["QUERY_STRING"]);
foreach ($q as $qi)
{
  if ($qi != "")
  {
    $qa = explode("=",$qi);
    list ($key, $val) = $qa;
    if ($val)
      $$key = urldecode($val);
  }
}
 
reset ($_POST);
while (list ($key, $val) = each ($_POST))
{
  if ($val)
    $$key = $val;
}
 

 

 
PHP GET and POST Variables scripts | PHP GET and POST Variables snippet | PHP GET and POST Variables example | PHP GET and POST Variables tutorial | PHP GET and POST Variables code