Posted: Wed Mar 21, 2007 8:46 pm
hey guys just thought Id get your opinion is this any good now. Thanks for the help so far has been awesome.
have used bits of everyones advice hope its decent let me know if you think its too messy.
Andy
Code: Select all
$id = isset($_GET['id']) ? $_GET['id'] : 'home';
if($id){
$id = isset($_GET['id']);
if (ctype_alnum($id)){
$file = "php/$id.php";
if(file_exists($file)){
include $file;
}else{
echo '<p class="center"> The page: <span class="bold">' . $id . '.php</span> you requested is unavailable at the present time please try refreshing the page or try again later, your error has been logged and the problem will be fixed shortly.</p>';
}
}else{
include 'php/home.php';
}
}Andy