check($_POST['code']); if($valid == true) { include_once("email.php"); include_once("thank_you.html"); } // if if (!$valid == true) { require_once("form.php"); } //else } // if isset else{ //show the form include_once("form.php"); }//else ?>