Click to See Complete Forum and Search --> : Simple QueryString Question


slyfox
11-18-2003, 09:42 AM
very new to php...

how do i get the value(123) in this query string? : ....com/index.php?123

this is what i tried sofar:

<?
$getQ = $QUERY_STRING;
print $getQ;
?>

and this is the error i get:

Notice: Undefined variable: QUERY_STRING in D:\Family\Matilda\Query\get.php on line 2

any help will do

pyro
11-18-2003, 10:03 AM
You should be setting both a key and a value, like this: com/index.php?var=123. Then you can get 123 by using this:

$var = $_GET['var'];