Easy PHP Contact Form (Non Captcha) Installation Instructions (Ver 2.0)

Method I

This method is recommended if you want to include the contact form on any existing PHP page of your website (say your existing contact page). The limitation of this method is that you can only display a confirmation message and not redirect to any specific thank you page you may have. If you would rather access the contact form as a separate page, skip to Method II. Compared to this method, Method II is bit easier to implement.

Open contact-config.php (within the formfiles directory) and edit the below 3 variables:

$to = 'youremail@email.com';

Change youremail@email.com to the email address where you wish the contact form messages to be delivered.

$subject_prefix = 'My Website Contact';

This will be the prefix that'll be attached to the subject of all contact form email messages.

$where_included = '';

You first have to select an existing PHP page on your website where you'll be displaying the contact form. This is the name of the file where you are including the contact form. If you don't have a PHP page, don't worry. You can simply rename your existing HTML page to PHP page. For example:

contact_us.html > contact_us.php

Note: The file where you are including the contact form and the contact-form.php file (along with the formfiles directory) must be in the same directory.

So if you are including the contact form in a file called contact_us.php, then the above variable will be:

$where_included = 'contact_us.php';

Now open the file where you are going to include the contact form, in this case contact_us.php, and put the below code to the place where you want the contact form to be displayed:

<?php include "contact-form.php"; ?>

Then add the below code to the very top of the same file:

<?php session_start(); ?>

That's it! Upload all the files to your server (retaining the directory structure). If you load contact_us.php, the contact form should be visible.

Note: The purpose of $where_included variable is to define the action attribute of the form tag:

<form action="contact_us.php#cform">

Setting this variable incorrectly will display the form but give an error on submitting.

Method II

This method is recommended if you want to access the contact form as a separate page and would like to redirect users to a separate thank you page you may have. You can use this method even if you don't want to redirect users to a separate thank you page.

1. Change:

$use_header_footer = FALSE;


$use_header_footer = TRUE;

2. $thank_you_url = '';

Add the url to your thank you page to the above variable. Example:

$thank_you_url = 'http://www.yourdomain.com/thank_you.html';

3. Change:

$where_included = '';


$where_included = 'contact.php';

Open contact-header.php and contact-footer.php (within the formfiles directory) and put your site header and footer information in them.

That's it! Upload all the files to your server, retaining the directory structure. You can now access your contact form directly by visiting:




...depending on where you have uploaded the contact form files.

Modifying the Security Questions/Answers

To modify/add/remove questions, modify the variable:

$question_answers = array (
'Moon is red or white' => 'white',
'Sun is blue or yellow' => 'yellow',
'Fire is hot or cold' => 'hot',
'Icecream is hot or cold' => 'cold'

Where left part denotes question and right part denotes answer. To add a question/answer set, simply add:

'New Question' => 'answer',

any where in between (Not in the end. And don't forget the comma in the end). So now it would be:

$question_answers = array (
'Moon is red or white' => 'white',
'Sun is blue or yellow' => 'yellow',
'Fire is hot or cold' => 'hot',
'New Question' => 'answer',
'Icecream is hot or cold' => 'cold'

Please make sure the answer is in lower case.

Modifying the Looks of Your Contact Form

To modify the looks of your contact form - background color, border, fonts, etc. please modify the variables under the "COSMETICS" section in contact-config.php file. All the variables are self-explanatory.

Want Installation Help?

Get the form installed on your website for only $15.

Important: If you are ordering an installation for the Captcha version, please make sure the minimum requirements are met on your server (PHP - 4.3.0 or greater/GD and Freetype support).

Click here to order installation from 2CO

Want a Customized Version?

Get a customized version for your website (upto 5 extra fields) for only $15. If you require more than 5 extra fields (excluding the basic fields Name, Email, Subject and Message) on your form, please contact me first before ordering from the link below.

Important: Please make sure the default (Captcha) version works on your server before ordering a customized version (If you want the Captcha version).

Click here to order a customized version from 2CO

Branding Removal

For only $9 remove the link back to Easy PHP Contact Form website on your form page. Please note that purchasing a license entitles you to remove the attribution link on one of your website. For multiple websites, you need to buy multiple licenses.

Click here to order branding removal from 2CO

2Checkout.com is an authorized reseller of goods and services provided by Vishal P. Rao.