/* Instructions: the form does not have a parameter in the action attribute, this means that once the send form button is clicked the same fom page is reloaded But before the form page is reloaded, the set.php script is run where a check is made to see if the correct captcha code was inserted by the user. If correct, then the captcha.php file is loaded. If NOT correct, the user is re-presented with the reloaded form page to be able to try again */ $error=0; if(isset($_POST['scratch_submit']) && isset($_SESSION['pass'])){ if(isset($_POST['captcha_input'])){ if($_SESSION['pass']==$_POST['captcha_input']){ $_SESSION['post']=$_POST; header("Location: result.php"); exit; } else {$error=1;} } else {$error=1;} }
|