I've been using Form mailer for a couple years but now have a huge issue with SPAMMERS...
Here is my Formmail code it is located at the top of the PHP file
- <form method="post" action="http://nasf.net/cgi-bin/form1.php" name="NASF Forms ">
-
<input type="hidden" name="recipients" value="webmaster@nasf.net" />
-
<input type="hidden" name="required" value="realname:Your name,phone:Your Phone Number" />
-
<input type="hidden" name="subject" value="2009 NASF CLINIC Enrollment Form" />
-
<input type="hidden" name="mail_options" value="PlainTemplate=2009_NASF_Clinic_Enrollment_form.txt" />
-
<input type="hidden" name="mail_options" value="PlainTemplate=2009_NASF_Clinic_Enrollment_form.txt,TemplateMissing=n/a" />
-
<input type="hidden" name="good_url" value="http://nasf.net/index.php?id=14" />
-
-
-
Here is my ReCaptcha Code i added above the submit button.. I added the Redirect that i found on a previous post.
-
-
<?php
-
require_once('recaptchalib.php');
-
-
// Get a key from http://recaptcha.net/api/getkey
-
$publickey = "6Lcy_AgAAAAAAKapihQSjk--oe6lcrb1duOT2rtP";
-
$privatekey = "6Lcy_AgAAAAAAHn-b3w9C6rhHNSm3ieDJvR0-TU7";
-
-
# the response from reCAPTCHA
-
$resp = null;
-
# the error code from reCAPTCHA, if any
-
$error = null;
-
-
# was there a reCAPTCHA response?
-
if ($_POST["recaptcha_response_field"]) {
-
$resp = recaptcha_check_answer ($privatekey,
-
$_SERVER["REMOTE_ADDR"],
-
$_POST["recaptcha_challenge_field"],
-
$_POST["recaptcha_response_field"]);
-
-
if ($resp->is_valid) {
-
echo ("<meta http-equiv=\"refresh\"content=\"1; url=http://nasf.net/index.php?id=14\">");
-
} else {
-
# set the error code so that we can display it
-
$error = $resp->error;
-
}
-
}
-
echo recaptcha_get_html($publickey, $error);
-
?>
MY PROBLEM....
I don't know what to do to get the Page Redirected and Email sent to me
IF i remove the
<input type="hidden" name="good_url" value="http://nasf.net/index.php?id=14" />
from the Formmail code i get this response.
Thanks! We've received your information and, if it's appropriate, we'll be in contact with you soon.
Your form submission was processed by (8.16), available from www.tectite.com.
If I put the code back in the formmail part.. It redirects to the thankyou page but no matter which i do.. I don;t get the emails.....
Can you recommend a way to incorperate these together so that the form works.. Spam is reduced or stopped and i get the email forms sent to me.
Thanks
ERIC