Here’s a sleek ready-made contact form with captcha code for you to integrate with your website in minutes. For past few days am running out of lots of spam mails on my website, hope you are using some Plugins to remove spam comments from your Blog. But incase of Websites, to stay away from spammers, here i have found a PHP contact form with Captcha enabled Script thats works very well. Integrate the simple Readymade Contact Form with Captcha Code toΒ your website and enjoy spam free emails.
You can do it in just few minutes without any Programming Knowledge using these simple steps.
Download and Modify e-mail ID :
This simple Readymade Contact Form with Captcha Code Works on all PHP enabled web servers.
I have made it very easy for you to integrate with your website, just download the files and edit a line in html-contact-form.php as shown below.
$your_email ='[email protected]';//
Put your email ID here, to which the mail has to be sent from the User, via the contact form.
Upload the Contact Form:
Now upload the “Contact Form” entire folder to your Web Server and try it. Here is the Snapshot of the Contact form
Captcha settings :
You can also modify the Captcha settings using these lines in the file captcha_code_file.php
//Settings: You can customize the captcha here $image_width = 120; $image_height = 40; $characters_on_image = 6; $font = './monofont.ttf';
Just download the files from here and integrate the simple Contact Form with Captcha Code toΒ your website. make sure PHP mail function is enabled on your web server for this to work.
Need any assistance ? leave your comments below, am here to help you ! π
JK@techtrickz says
Nice share, but I need little more information. That is, where to upload this code (in which section) and how to implement this on a site.
Stock Photos says
This is helpful for my personal website.
esoftload says
it’s so simple… added in my wordpress blog…
shashank says
gonna add this to my site soon!!
THNX 4 sharE π
Surfers accommodation says
As you probably know, captcha codes are a popular way to detect and stop spam bots, as they can not distinguish letters and numbers in an image if they are displayed in a noised way.
TechGopal says
nice form
bt i use kontactr …..
Siddharth says
Kontactr is easy to use.. but not the professional way π
Sourish | Iphone 4 Jailbreak says
catpcha’s save a lot of work , and reduces almost every bot related , spamming on the web
Iphone 4 Jailbreak says
i was using captcha for a long time , but now use Akismet for fewer comments i have .
Siddharth says
for blog its better with akismet , but for websites this ll be helpful !
medical assistant says
Terrific work! This is the type of information that should be shared around the web. Shame on the search engines for not positioning this post higher!
Siddharth says
its coz there are lot many Programming sites that interfere into but still stays in first page for search “readymade contact form ” π
joe says
i have added this to my site and i have tryed it but i am not recieving any emails off of it and it says it was successful at sending it.
Siddharth says
make sure you have made necessary changes in code, do let me know if its still not working .
joe says
thanks but it is working now it was just slow to send them at first but it is ok now
Link Juice says
Thanks for it. Its working.
Siddharth says
Glad that it helped you π
mike says
Hello,
I am trying to use this form for my website but it is always showing the error message: The captcha code does not match! Can you help me figure it out please. Thank you.
Siddharth says
i tested it before uploaded, try re-uploading your files again, hope to work.
Dallas says
I am having the same problem as the previous user. No matter how many times I try, I get an error message saying the captcha code does not match.
please help.
thanks
praneeth says
Hi,Thnaks for the code! I got a problem!
I am getting this error.
SMTP server response: 501 5.5.4 Invalid Address in C:\xampp\htdocs\Work\captcha\html-contact-form.php on line 52
Anshuman chandel says
thanks! very informative post and yet very simple. i tried various other google first page search results but noting works for me..thanks again!
Anshuman chandel says
hello siddharth, i want to test it on localhost using wamp server, dose it work on my localhost?
Siddharth says
i think it won’t, better try over a webhost !
Siddharth says
cool π
Siddharth says
i hope it won’t work on local host !
Andrew says
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/sct.php:7) in /home/shoml/pinmail.php on line 4
Hi, I have been trying to test this directly implemented on a contact.php page on my site and as an include, although I keep getting the above message? If I change the location of or delete the session start it just doesn’t verify the captcha code.
Thanks in advance for any help.
jeff says
Is the download no longer available? as it gives an error when I to download
cheers
Siddharth says
i’ll check it.. sorry for the inconvinience
jeff says
Thanks for the resonse Siddharth. The download worked ok with Chrome, but it throws up an error with I.E.
Cheers
Jeff
Brian says
Hi Siddharth, the form works great! I am wondering how to add a second email address to the code. I tried the following without success: $your_email =’[email protected], [email protected]‘;// <<=== update to your email address. Your help is much appreciated.
Kindest Regards,
Brian
raj says
You said “Now upload the entire folder to your Web Server and try it. ”
Can you elaborate..whether I have to create a new page with php extn…and paste both the php files here and then link this to my other page where I have a “CONTACT” box ?
I am a newbie..sorry
Bob says
I was wondering if you could help guide me with a problem. I own a small fitness Center but I am not a programmer with that being said the problem that i am having is that potential customers are leaving their email on our “contact me” page, “email me”, button but sometimes they do not enter their contact email correctly. I have seen on other contact forms that the customer will enter their email twice to make sure that they match and if not they get notified right at that time that their email isn’t correct. I have searched on line and the web site company i am using doesn’t have anything like this. They recommended google widgets but no luck. Everytime this happens I have no way to contact potential members and is costing our company money. I am looking for something that i can cut and paste, html. Do you have any ideas for me. Thank you for your time and consideration. Bob
Andrew says
I am trying to embed this in an html page with sime CSS styling. I cant seem to get it to work correctly. It appears as though the PHP code gets broken by the HTML.
Could you perhaps give me a guide to installing the script in an HTML page?
Thanks π
arif khan says
Hi i m unable to redirect after the form is being submitted can you help me with that ?
header(“Location: http://www.mysitename.com/thankyou.php“); tried this
header(“Location: “); tried this too
header(“Location: thankyou.php”); tried this also
Siddharth says
Its quite easy, i’ll update this thread very soon π
Kalpana Murthy says
Hi, will I be able to use this code in Face book Static Html Iframe tabs, by uploading the files to my webserver?
Thanks
Kalpana Murthy says
Figured out how to use this in Facebook Iframe tabs. It works!
Siddharth says
That’s great !
Sidharth says
everything is integrated and works fine, but i cannot receive the email. further, i just copy-pasted your code and changed the email only – the same problem.
Siddharth says
hi,
i just tested it after a long time.
its working 100% perfect. You only need to modify the email as specified.
Do check if your Hosting provider allows php mail function. if you are using free hosting, it may be disabled.
Siddharth says
Man,
Do note, its “thank-you.html” and not “thankyou.html”
Siddharth says
You just simply upload it, no creation of new files needed. Only thing to change is email ID.
Siddharth says
Instead doing that way,
simply modify this command, “mail($to, $subject, $body,$headers);”
instead “$to”
use “[email protected],[email protected]”
hope it helps π
Siddharth says
may be due to some server issues. contact your host provider on php mail function if it is enabled.
Siddharth says
Glad you fixed it, the Speed depends on your server !
Siddharth says
just download files and upload to your server. only thing is to set the email as your email, to receive mails. that’s it π
Billy says
Hi,
I upload your readymade captcha php file but the form captcha image is not displaying, what is the problem? You can view it at http://www.chinese.net.my/captchatest/html-contact-form.php
Please advice if any modification I should do.
THank you.
Siddharth says
Not sure about it, pls try uploading again.
Charlie says
I need a form with the fields:
name, email, company name, phone, message
With the ability to make them required fields, and to confirm email address.
Is there a simple way of adapting your form.
Very grateful for any tips in advance.
Charlie
Siddharth says
Yes, you can do that easily if you are aware of HTML codes a little bit,
Just open the source file and add required fields and also update the same where the values are received.
raj says
Whether this will work on host servers requiring “SMTP with Authentication” ?
Sandeep Yadav says
We can use this php form as page template to create new contact page on WordPress theme. Just select new page from WordPress Dashboard and set template this file. Finally publish your new page and you will get latest contact page without any plugin.
Thanks for this awesome php script π
Len says
I am a little lost here.
When I go to Download the files it doesn’t download it takes me to google docs , is it supposed to be one whole file I am supposed to download?
And when you say upload it to my server, do I upload one whole file or many files to my www. file?
And how do I make sure my servers PHP is activated?
Thanks
Siddharth says
Just download it, Extract the files, then upload, after making changes !
Most servers are PHP Activated.
raj says
Will this not work on servers which require “SMPT with authentication ” to forward mails ?
Pat says
Very nice and easy code, but how do I insert it each section on my page, so it could be aligned properly and work efficiently?