CAPTCHA image verification NEVER works!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
antoine
Forum Commoner
Posts: 37
Joined: Thu Jul 10, 2008 1:43 pm

CAPTCHA image verification NEVER works!

Post by antoine »

I have a CAPTCHA image, which shows up and works fine, but the validation code:

Code: Select all

   include('captcha/captchac_lib.php');   
    $Turing_code = $_REQUEST["Turing"]; 
    if ( CheckCaptcha($Turing_code) !=1 )
    {
        print "<meta http-equiv=\"refresh\" content=\"0;URL=errorpage.php?code=3\">";
    return 1;
    }
 
(where "Turing" is the name of the field that the user inputs the code and "captcha/captchac_lib.php" is the file that makes the code for the image.

...never works. It is the same as the code in the downloaded "CAPTCHA Creator PHP Script 1.2, except I changed it from:

Code: Select all

echo "Some error message"
It is inserted in the top of my form_process.php file (which works fine for validation and sending emails, etc, but no matter what I put in the "Turing" text box, the email sends anyways.

I was wondering what "return 1" is for?

Does anyone have an idea of how to make this work? I don't want to have to install another program though. Maybe someone could download the trial version (which has demo version at the top) and see if they can get it to work, and post back?

Thanks
Post Reply