I have got this in my form submission page (submission/index.php)
<?php
require_once('
http://www.sensors.co.uk/files/scripts/
recaptchalib.php');
$privatekey = "6LeSVcASAAAAAFjvemDqQrBURSLX2cy31G5Zj7f_";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("<p>The reCAPTCHA wasn't entered correctly. Go back and try
it again.</p>" .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
if (!$_POST['email']) { exit("<b><center>You did not supply an E-Mail
address. We need this to reply to your E-Mails.<br /><br /><a
href='JavaScript:history.go(-1)'> &lchev; Go Back</a></center></
b>"); }
if (!$_POST['thename']) { exit("<b><center>You did not supply a name.
Please go back and try again.<br /><br /><a
href='JavaScript:history.go(-1)'> &lchev; Go Back</a></center></
b>"); }
if (!$_POST['companyname']) { exit("<b><center>You did not supply a
company name. Please go back and try again.<br /><br /><a
href='JavaScript:history.go(-1)'> &lchev; Go Back</a></center></
b>"); }
if (!$_POST['address']) { exit("<b><center>You did not supply an
address. Please go back and try again.<br /><br /><a
href='JavaScript:history.go(-1)'> &lchev; Go Back</a></center></
b>"); }
else { $name=$_POST['thename']; }
$email=$_POST['email'];
$companyname=$_POST['companyname'];
$method=$_POST['method'];
$address=$_POST['address'];
$ReferURL=$_POST['ReferURL'];
$ReferDate=$_POST['ReferDate'];
$subj=$_POST['subj'];
if ($subj=='') { $subj="Not Supplied"; }
if (!$_POST['message']) { $mess='<i>Not Supplied</i>'; }
else { $mess=$_POST['message']; }
$mess="<b><u>Name:</u></b> ".$name."<br /><b><u>Preferred Method:</u></
b> ".$method."<br /><b><u>Company Name:</u></b> ".$companyname."<br /
><b><u>Address:</u></b> ".$address."<br /><b><u>Refererring Webpage:</
u></b> ".$ReferURL."<br /><b><u>Date:</u></b> " .$ReferDate;
mail("MY EMAIL ADDRESS",$subj,$mess,"Content-type:text/html\r\nFrom:".
$email);
echo "Your message has been successfully sent.";
}
?>
On Apr 14, 3:40 pm, PJH <
pauljherr...@gmail.com> wrote:
> On Thu, Apr 14, 2011 at 3:31 PM, sensors <
webmas...@sensors.co.uk> wrote:
> > Just tried that,
>
> > it returns this:
>
> > Array
> > (
> > )
>
> It shouldn't. It should contain the data from your form. Which will include
> the reCAPTCHA entry.
>
> You're getting incorrect-captcha-sol because you're passing
> blank/empty/unset strings to it.
>
> An example of what you *should* be getting back (from the example code on a
> different thread):
>
> Array
> (
> [First_Name] => First
> [Surname] => Sur
> [Email] =>
Em...@example.com
> [Phone] => Phone
> [User_Type] => home
> [Message] => Message* [recaptcha_challenge_field] =>
> 03AHJ_Vuunay3pybHkJvxYeTpw1HnCdxSYsMPBQdsDvISz7ia_7mrZjNWZhA8poxVGUvUBe7_Bw7zkl36uNYGwDItJJ4i0fUnPol0aDiBmXTC5XCso2ZDbVlXV5a0pn1sJQX8cBmjkJ5crFrFdB-jEwEzgjyhDRgp0PQ
> [recaptcha_response_field] => nteselys cedric*