Dynamic Navigation
Posted: Sat Jun 24, 2006 10:27 am
I'm trying to make my links like this:
http://perks.mypimpedlayout.com/index.p ... e=schedule
Where 'id' selects the folder and 'page' selects the file inside that folder. I'm using this code but it isn't working:
http://perks.mypimpedlayout.com/index.p ... e=schedule
Where 'id' selects the folder and 'page' selects the file inside that folder. I'm using this code but it isn't working:
Code: Select all
<?php
$id = $HTTP_GET_VARS["id"];
$page = $HTTP_GET_VARS["page"];
$extension = "php";
if ( !$id || $id == "" )
{include "./school.php";}
else if ( file_exists( "$id.$extension.$page" ) )
{include "$id.$extension.$page";}
else{ echo "<center><h2>404 ERROR!</h2></center>"; }
?>