Sunday, April 1, 2012

Var "GET" In PHP



$HTTP_GET_VARS contains the same initial information, but is not a superglobal. (Note that 
$HTTP_GET_VARS and $_GET are different variables and that PHP handles them as such)

Example #1 $_GET example

<?phpecho 'Hello ' htmlspecialchars($_GET["name"]) . '!';?>

Assuming the user entered http://example.com/?name=Hannes
The above example will output something similar to:
Hello Hannes! 

0 comments:

Post a Comment