View Single Post
Old 07-20-2008, 01:54 PM  
potter
Confirmed User
 
Industry Role:
Join Date: Dec 2004
Location: Denver
Posts: 6,559
Quote:
Originally Posted by jimbona View Post
Code:
$allowed_ids = array(1=>"1.php",2=>"2.php",3=>"3.php");
$ID = intval($_GET['ID']);
$page = "";
if(array_key_exists($ID,$allowed_ids))
{
        $page = $allowed_ids[$ID];
        include ('header.php');
        include ($page);
        include ('footer.php');
}
else
{
        include ('noid.php');
}
Nice, I like that allowed arrays part.

Thanks a bunch everyone. Going to take these back and try em out on my project. Be back in a little bit.
__________________

potter is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote