Thank you, Joe, for your prompt reply. I appreciate it.
I guess you're right...I have started running into problems.
I've started to implement the reCaptcha utilizing the reCaptcha installation for php instructions on the Google Developer's page, located here:
https://developers.google.com/recaptcha/...p?hl=zh-TW . I've had success using this method on other systems but I'm now trying to make it work with Form Tools.
When I test the installation, I first submit the form without the challenge field entered within my reCaptcha. It successfully sees that I've failed to enter anything and spanks me for it. So far so good.
I then enter the challenge answer in the reCaptcha field, submit the form and I get the following error message:
"Fatal error: Call to undefined function: process_form() in /home/xxxxx/domains/sample.com/public_html/forms/process.php on line 39"
(the installation has the form tools name changed to 'forms')
In the form, right before the submit button, I have the following code calling up the reCaptcha widget:
Code:
<?php
require_once('forms/recaptchalib.php');
$publickey = "my public key number was entered here"; // you got this from the signup page
echo recaptcha_get_html($publickey);
?>
In the top of process.php, I had entered the following code, as per Google's instructions, right after the opening php tag:
Code:
require_once('recaptchalib.php');
$privatekey = "my private key number was entered here";
$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 ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
...then the rest of the process.php file, followed by another closing bracket (}) at the end of the file, right before the closing php tag.
The error above is referring to the part of the process.php code that reads:
Code:
else
process_form();
...that's where it fails. BTW, without my added reCaptcha code added at the top of the page, that part of the code would normally fall on line 25.
I tried adding the reCaptcha code right after the "process_form()" line but that didn't work, either.
Is there something else I need to do? Should I have entered the opening code at another location within process.php? I'm assuming process.php is where it should have gone, right? Anything I need to do to the global/config.php file?
Again, any help is appreciated. Thanks.
Oh... one last thing: the link you offered seemed to be covering the API version only. Within that page, however, there is something that reads:
"You can add submissions to Form Tools by two methods: the API or by directly posting your form to the process.php script. The second type is known as a POST form; this tutorial explains how to add a CAPTCHA to that form type."
...and then fails to do that. It seems that failure was mentioned in an old 2009 thread, which you can read here:
http://forums.formtools.org/archive/inde...d-199.html.
Unless, of course, I'm missing something really obvious (I hope).