Setting Up an HTML Contact Form and then submitting it with php script

First, download and extract the the php form mail script. After the script is extracted, in a text editor such as Notepad, open the formmail-php.php file.

Follow the instructions in the formmail-php.php file for customizing variables and entering the email address where you want to receive messages from the form. Save the formmail-php.php into the same folder as your .html files.

Next, open the html file from your template that has a contact form in it.

In the HTML source code, just beneath the top <body> tag, put these two tags:

<form method="post" action="formmail-php.php">
<input type="hidden" name="send" value="1" />

Then, also in the html file's source code, locate the template's "send" button image, which could look like this:

<img src="images/b_send.gif" />

Change the image to a form element so the tag reads:

<input type="image" src="images/b_send.gif" />

And lastly, just above the closing </body> tag at the bottom of your page's source code, type

</form>

Save both the formailphp.php and the html files, and upload them to the same folder on your web server.