I think the number is
"; $_SESSION['attempt']++; $x = $_SESSION['attempt']; echo "You have try $x.
"; $beza = $N-$A; if ( $beza <= 5){ echo "Dekat sangat doh tu!"; } if ($A < $N){ echo "Number yg diteka lebih kecil drp nombor sebenar"; }else if ($A > $N){ echo "Number yg diteka lebih besar drp nombor sebenar"; } }else{ $attempt = $_SESSION['attempt']; echo "Boleh balik! You have made $attempt tries"; $_SESSION['attempt'] = 0; } } ?>