require_once('recaptcha-php-1.10/recaptchalib.php'); $privatekey = "6LfS2AUAAAAAAMhj1ZOhZgbK5aCLnRmn7KgbHmJA"; $publickey = "6LfS2AUAAAAAALkkbiZUSxQxFTxp42eI8GQWC-Tj"; $name = $_POST["name"]; $phone = $_POST["phone"]; $email = $_POST["email"]; $comment = $_POST["comment"]; $to = "primeforest@aol.com, mike_ringenberg@yahoo.com, aacomponents@sbcglobal.net"; //$to = "mark@30degreesnorth.com"; $mail_sent = 0; if ($_POST["recaptcha_response_field"]) { if($name=="" || $phone=="" || $email=="" || $comment==""){ $field_error = "Please fill in all fields"; } else { $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if ($resp->is_valid) { if ( ereg( "[\r\n]", $name ) || ereg( "[\r\n]", $email ) || ereg( "[\r\n]", $phone ) || ereg( "[\r\n]", $comment ) ) { } else { $message ="Name: $name Email: $email Phone: $phone Comment: $comment"; mail($to, "AAC Contact Us Form Form", $message, "From: $email" ); $mail_sent = 1; } } else { # set the error code so that we can display it $captcha_error = $resp->error; } } } ?>