Contact Form [PHP]
Download Source Code

SHA1: 893cfe1f5afe4d60f25a63f1df365a2f0c42f640

The contact form enables users of your website to make contact without you having to disclose your email address publicly. The receiving email is invisible to the user, at least until you choose to answer. The user can select to get a get a copy of the mail and the sender of this mail can be set to a no-reply address. The contact form has a capthca that the user has to enter in order to submit the form - this blocks at least the most stupid spambots from using the form and looks cool too.
You can see a screen shot of the contact here or you can see it in action on my contact page.
Setup
Prerequisites: your web server must have PHP GD library installed for the captcha to work.
- Download the zip locally and extract it.
- Edit
index.php
and enter the receiving email. Multiple receivers can be specified comma separated and will be visible to each other but not to users. - Enter the sender email used if the user selects to receive a copy. It will also be used as sender to the receivers entered above and some webhosts require this email to be a valid one on the domain where the contact form is implemented. Typically use a no-reply email.
- Upload the folder to your website with FTP.
- Open a web browser, request the folder, and test that the form works!
Additional Settings
- In
index.php
you can also select a language file: currentlyenglish.php
anddanish.php
are available (feel free to make a translation into your own language). - The two style sheets can be customized to match your site or branding.
- Edit
banned_words.txt
and add or remove words as you see fit. Words in this file are used to check the form content and if a match is found sending is blocked with an error message to the user. If this functionallity is not desired simply empty or delete the file. - The captcha can be adjusted if desired by editing
ChallengeImage.php
, e.g. change contrast or font, etc.