note 18979 added to language.variables.external
| From: | cscotti at ifrance dot com | Date: | Tue, 12 Feb 2002 14:30:52 +0000 |
| Subject: | note 18979 added to language.variables.external | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26509@lists.php.net to get a copy of this message | ||
This is a powerfull function which scan
forms post, query string
and return the value
function GetRequest( $name)
{
global $QUERY_STRING;
global $HTTP_POST_VARS;
$Qpost = $HTTP_POST_VARS;
$Qstr = $QUERY_STRING;
while (list ($header, $value) = each ($Qpost))
{
$Qstr .= '&'.$header.'='.$value;
}
$aObj= split("&",$Qstr);
$val= "";
foreach($aObj as $sRes){
$i_pos= strpos($sRes,$name);
if ($i_pos !== false && $i_pos==0){
$i_pos= strpos($sRes,"=")+1;
$val= substr($sRes,$i_pos,strlen($sRes));
break;
}
}
return $val;
}
--
http://www.php.net/manual/en/language.variables.external.php
http://master.php.net/manage/user-notes.php?action=edit+18979
http://master.php.net/manage/user-notes.php?action=delete+18979
http://master.php.net/manage/user-notes.php?action=reject+18979