Click to See Complete Forum and Search --> : what is wrong with this??


slyfox
11-18-2003, 04:32 PM
Hi peoples


<?php
if ($_SERVER["QUERY_STRING"] = "")
{
$getI = "";
} else {
$getI = $_SERVER["QUERY_STRING"];
}
?>


if i send no query string it is fine... but if i send a query string it does not set $getI with the "supposed to be found" value

any ideas

pyro
11-18-2003, 04:48 PM
Try it like this... :)

<?php
if (empty($_SERVER["QUERY_STRING"])) {
$getI = "foo";
}
else {
$getI = $_SERVER["QUERY_STRING"];
}
echo $getI;
?>

slyfox
11-18-2003, 04:51 PM
THANK YOU ONCE AGAIN!!!!!!!!!!

it's working like a dream!!!!!!

pyro
11-18-2003, 05:05 PM
You bet... :)