is_valid) { $_SESSION['contactform']['passedimage'] = true; return true; } return false; } if(!isset($_SESSION['contactform']['passedimage'])){//We dont want to show the user the image verification if they have already passed it. $_SESSION['contactform']['passedimage'] = false; } require_once($_SERVER['DOCUMENT_ROOT']."/tutorials/formprocessor/contact/recaptchalib.php");//Include the recaptcha class $javascript = << var RecaptchaOptions = { theme: 'custom', lang: 'en', custom_theme_widget: 'recaptcha_widget' }; EOD; //These keys will work on your server, you can apply for your own if you wish $public = "6LcVYgQAAAAAABG5IOef21_v3tuhZXGRKEg-WXdP"; //Public Key for recaptcha $private = "6LcVYgQAAAAAAJFjVVeejrCHaugQ0pT5dT10IvsV";//Private key for recaptcha $error = null; //No Errors as of yet $recaptchahtml = recaptcha_get_html($public, $error);//Get the recaptcha HTML - remember to global this in the form function echo $javascript;//Display the recaptcha Javascript function showForm(){ global $recaptchahtml; $form = <<

Here is a basic example of the formprocessor, this is a simple input.

In this example:

Error:

!


!


!