error_reporting(E_ALL); //Show all errors, warning, notifications - good practice! if(isset($_GET['no']) && $_GET['no'] != ""){ // This checks if $_GET['no'] is set - as in it exists, but also checks if it contains anything. If it doesn't we execute the else $no = $_GET["no"]; echo 'test1'; } else { $no = '405'; echo 'test2'; } var_dump($_GET['no']); //This line will display detailed information of what $_GET['no'] has set in it, very useful for debugging