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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.