I have some code, $number = urldecode( $_GET['id'] ); Which gets the id from the url, ('/GAMETAB/template.php?&id=') but you can change this manually... to like '/GAMETAB/template.php?&id=200000' Which would be invalid. Is there any to put, if the 'id' number isnt in the table/database, it will redirect you to an error page, or something? Is this possible? Please comment...
$number = urldecode( $_GET['id'] ); Search $number in you database if ($number NOT found) { echo "Invalid"; } else { .... Is this what you need or Im missing something here...?
<?php // inval() is for security. $number = intval($_GET['id']) require_once(db_config.php); $queryGetGames = mysql_query("SELECT * FROM table_perfix WHERE id = '$number' "); $numGames = mysql_num_rows($queryGetGames); if($numGames == 0){ echo "NO GAMES WERE FOUND"; exit; } else{ // your code here.. } ?> Code (markup): Please notice that inval cannot deal with numbers bigger than 2147483647. Good Luck.