Posted in Web Design - Advanced
Monday, April 19th, 2010 at 12:32 pm

Add a Contact Form

See the demo here.

To implement this form in your own site:

1. Download the files

You can download the ZIP folder here.

2. Grab the required HTML and PHP and add them to your own Contact.php file.

  • You will find the HTML and PHP in the file named Contact.php. Look for the comments to tell you what parts to grab.
  • Copy them to your own file.
  • Make sure to change the new file name to contact.php. (The php extension is required for the form to function properly on the web. NOTE: This form will not run properly unless installed on a server running PHP.)

3.Update the e-mail information.

You will find this in the Top-of-Document PHP section:


	        // set your email address and subject...
	        $to = "comm@okwu.edu";
	        $from = "dcochran@okwu.edu";
	        $subject = "[Your Website] Contact Form";

4. Grab the embedded styles and modify them to style your form to taste.

  • You will find these at the bottom of the head element of the contact.php document.
  • Copy and add them to your external stylesheet, and modify them to suit you!

5. Take the folder named “captcha” from the assets folder and upload it to your own assets folder.

This is required to make the security part of the form work. (The form will be broken until you have this in place.)

Comments are closed.