Forum Moderators: coopster
I am trying to create a small script but I get an error on line 9 if I access the index.php file w/out any querystring
if I access "index.php?about" no problem
if I access "index.php" I get the error
error:
=======
Notice: Undefined index: QUERY_STRING in F:\Webfarm\SPI\index.php on line 9
Script:
=======
<?php
$page = $HTTP_SERVER_VARS['QUERY_STRING']; //line 9
if ($page==""){
include("pages/homepage.php");
}
elseif ($page=="about") {
include("pages/about.php");
}
elseif ($page=="contact") {
include("pages/contact.php");
}
else {
echo "Bad Boy, Bad Boy, What you gonna dooo. When they come for you!";
}
?>