unset($_SESSION['checkcap']); if($_POST['captcha'] == $_SESSION['cap']) { $_SESSION['checkcap']=true; echo 1; }