// Lets check if id is an integer.if(ctype_digit($_GET['id'])) {// Yes, it is, so we set $id. $id = $_GET['id'];}elseif(is_numeric($_GET['id'])) { $title = "Error"; $description = "Sorry, no id was specified."; include("error.php"); }// Lets check if the id exists in the database. $q = mysql_query("select id from casinos where id = '$id'") or die(mysql_error());elseif(mysql_num_rows($q) == 0) {// No it isn't, so we output an error. echo '<h2>Error</h2> <p><a href="/all.php">View All Casino\'s</a></p> </div>'; $title = "Error"; $description = "Sorry, that id was not found in our database."; include("error.php"); }