megany Posted January 31, 2009 Share Posted January 31, 2009 Hi! I've been working all day to install Secure Image to the form I'm using. The form is Jack's Formmail. I followed all of the instructions on the website and used the code in the instructions found on the website for the form processor: include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php'; $securimage = new Securimage(); if ($securimage->check($_POST['captcha_code']) == false) { // the code was incorrect // handle the error accordingly with your other error checking // or you can do something really basic like this die('The code you entered was incorrect. Go back and try again.'); } But even when I enter the code correctly, it tells me I was wrong. The form I'm working on is: http://superiordisposalservice.com/Sign-up.html This is the first part of the form processor file (I removed my email addresses though): <?php session_start(); ?> <? /* ############################################################################## # PLEASE DO NOT REMOVE THIS HEADER!!! # # COPYRIGHT NOTICE # # FormMail.php v5.0 # Copyright 2000-2004 Ai Graphics and Joe Lumbroso (c) All rights reserved. # Created 07/06/2000 Last Modified 10/28/2003 # Joseph Lumbroso, http://www.aigraphics.com, http://www.dtheatre.com # http://www.dtheatre.com/scripts/ ############################################################################## # # This cannot and will not be inforced but I would appreciate a link back # to any of these sites: # http://www.dtheatre.com # http://www.aigraphics.com # http://www.dtheatre.com/scripts/ # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # ############################################################################## */ include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php'; $securimage = new Securimage(); if ($securimage->check($_POST['captcha_code']) == false) { // the code was incorrect // handle the error accordingly with your other error checking // or you can do something really basic like this die('The code you entered was incorrect. Go back and try again.'); } // for ultimate security, use this instead of using the form $recipient = "[email protected]"; // [email protected] // bcc emails (separate multiples with commas (,)) $bcc = "[email protected]"; Thanks a million! Link to comment https://forums.phpfreaks.com/topic/143299-trouble-installing-secure-image-php-captcha-on-form/ Share on other sites More sharing options...
megany Posted February 1, 2009 Author Share Posted February 1, 2009 I looked up four more captcha scripts and tried installing each of them...and all of them failed. Every time I get the message that says the code is incorrect. What am I doing wrong? I promised this company, which belongs to a friend of the family, that I would have their captcha installed and working by the end of this afternoon and instead their form has been down for hours because I haven't been able to get it work. I'm trying...all of the tutorials looked so simple. They only had two or three steps. Thanks again, Link to comment https://forums.phpfreaks.com/topic/143299-trouble-installing-secure-image-php-captcha-on-form/#findComment-751719 Share on other sites More sharing options...
Philip Posted February 1, 2009 Share Posted February 1, 2009 Looking earlier on your form, I saw the captcha but didn't have time to reply. What I think is happening, is every time you submit the form you are calling to create a new security image, thus creating a new security code & making the one the user saw invalid: $securimage = new Securimage(); When you read through this tutorial, you might understand it better (notice the session key vs post value?): http://www.codewalkers.com/c/a/Miscellaneous/Creating-a-CAPTCHA-with-PHP/ Link to comment https://forums.phpfreaks.com/topic/143299-trouble-installing-secure-image-php-captcha-on-form/#findComment-751742 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.