PHP recaptcha send mail issues

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-05-30T01:32:01Z Indexed on 2010/05/30 1:32 UTC
Read the original article Hit count: 290

Filed under:
|

Hey guys, if anybody can help me out i'd love it...

What i have is a form, that went sent, uses doublecheck.php
php
require_once('recaptchalib.php');
$privatekey = "";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
die ("Sorry please go back and try it again." .
"" . $resp->error . ")");
}
if ($resp->is_valid) {
require_once('sendmail.php');
}
?>

And then my sendmail.php

php

$ip = $_POST['ip']; $httpref = $_POST['httpref']; $httpagent = $_POST['httpagent']; $visitor = $_POST['visitor']; $notes = $_POST['notes']; $attn = $_POST['attn'];

$todayis = date("l, F j, Y, g:i a") ;

$attn = $attn ; $subject = $attn;

$notes = stripcslashes($notes);

$message = " $todayis [EST] \n Attention: $attn \n Message: $notes \n From: $visitor ($Your Prayer or Concern)\n Additional Info : IP = $ip \n Browser Info: $httpagent \n Referral : $httpref \n ";

$from = "From:\r\n";

mail("", Prayers and Concerns, $message);

?>

Date:

Attention:
Message:
", $notes); echo $notesout; ?>


Next Page

What i'm having a hard time with is when its succesful i need to send out $notes but $notes is always blank. Should i just put my sendmail php inside of my successful php? Or can someone explain to me why $notes is blank.

I do have my recaptcha key in, and also i do have an email address. I kept some things private, also there is a notes textarea in my HTML

© Stack Overflow or respective owner

Related posts about php

Related posts about recaptcha