Jump to content

PHP Sendmail & Captcha


LemonChip

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/239405-php-sendmail-captcha/
Share on other sites

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 :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.