hello i need help.
im using this script
PHP Code:
<?PHP /*include("classic/".$id .".php");*/ if(!isset($_GET['id'])){ $page = "main"; } else { $id = $_GET['id']; } if(file_exists("classic/".$id .".php")){ include("classic/".$id .".php"); } else {
/* Put your own error message or some other content. Even a redirect to the main page would work */ include("classic/main.php"); } ?>
the linking works fine. but when the home page. it shows
Notice: Undefined variable: id in classic.php on line 135
and line 135 is
PHP Code:
if(file_exists("classic/".$id .".php")){
is there something i missed? is there a better way to do this?
the server im using is a windows server but using php5.
please help me
thanks
|