LemonChip Posted June 15, 2011 Share Posted June 15, 2011 Hey all firstly I'm a bit of a php noob so i'll try to explain this so it makes sense... I have this PHP sendmail template which is awesome and has served me well over a number of years... Essentially a file i.e. mail.html with a form users can put their info in, it posts the info to sendmail.php for example... Sendmail.php then sends the info to the nominated email address. It always works for me, and I love it. My problem is that now I'm trying to change it up so that there's a captcha field in the mix. I just finished a little tutorial on captcha forms and got it working nicely, however in the example the form eg. captcha.php posts the information back to captcha.php in order to validate it. I tried modifying it so that when the captcha validation passes, that it would then call sendmail.php using ---> header("Location:file address"); The email is delivered perfectly but of course the information that was in the form fields is gone. Hoping you guys will be able to shed some light on it. Quote Link to comment https://forums.phpfreaks.com/topic/239405-php-sendmail-captcha/ Share on other sites More sharing options...
Fadion Posted June 15, 2011 Share Posted June 15, 2011 Integrate the captcha code into the mail page, otherwise you'll need to pass email information using GET variables or SESSION (which won't be very great). If everything goes wrong with your captcha integration, you can even use reCAPTCHA. Quote Link to comment https://forums.phpfreaks.com/topic/239405-php-sendmail-captcha/#findComment-1229937 Share on other sites More sharing options...
LemonChip Posted June 15, 2011 Author Share Posted June 15, 2011 Hey sorry this as i said before im a bit of a noob... what do you mean integrate it in the mail page? And also what is recaptcha? Quote Link to comment https://forums.phpfreaks.com/topic/239405-php-sendmail-captcha/#findComment-1229943 Share on other sites More sharing options...
Fadion Posted June 15, 2011 Share Posted June 15, 2011 The script you have finished using a tutorial can be used in the same page you have the mail form. It's pretty much the same thing, just that when the captcha is correct, you send the mail. reCAPTCHA is a service that generates captchas and offers a developer's API to be easily used in your website. It's like your normal captcha thing, but a lot more difficult to crack and by using it you help digitalizing books Quote Link to comment https://forums.phpfreaks.com/topic/239405-php-sendmail-captcha/#findComment-1229944 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.