$getId = intval( $_GET['Id']); if( $getId != 0){ // code(if the above $getId is a number); } else { // code(if not); }