<?
$captchaword = $_POST['captcha'];
$captchanum = $_POST['captchapic'];
if((!$name) or (!$email) or (!$captchaword)){
?>
<br><p class="error">Oops! You missed a required field. Please try again.</p>
<?include('../includes/packagesform.php');?>
<?
} else {
$captchawords = array("church", "reception", "ceremony", "flowers", "groom", "bride", "wedding");
$captchanumbers = array("1", "2", "3", "4", "5", "6", "7");
$captchaconverted = str_replace($captchawords, $captchanumbers, $captchaword);
if($captchaconverted != $captchanum){
?>
<br><p class="error">Oops! The word you entered to match the image was incorrect. Please try again.</p>
<?include('../includes/packagesform.php');?>
<?
} else {
// Do whatever you want to do with the info
}
}
?>