HTML Basix - HTML tutorials and online webmaster tools


Htaccess code generators Code generators Tutorials

Online and offline code generators


Subscribe to RSS feed
Subscribe to the HTML Basix RSS feed.

PHP Contact Form Code Generator


Create a contact form that allows site visitors to email you without the need to use their email client. This generator will create a PHP contact form which is placed on your contact page and will display a form which site visitors fill out. When the submit button is clicked, form validation is performed using javascript. When the form submits, the visitor is presented with a 'thank you' message of your choice, and an email is sent to the stipulated address.

Code is included within the form to help prevent email header injection, preventing spammers from using your form to send mass emails.

This is a simple form, aimed at putting a basic contact form on your site. If you are proficient with HTML and PHP, you can use this form as a basis, saving you coding from scratch - and customise the form as required.

Form item instructions:
  1. Select type of field and click 'Add this item to my form'
  2. Each item must have a field name, ie: email. This doesn't get displayed, it's an 'identifier'. If not provided, a default name will be set.
  3. Enter values pertaining to the item selected
  4. When you have all of the fields you want, continue down to the email properties
    and fill in the necessary information
  5. Click generate, then copy and paste the generated code into your contact page.
If you would like to learn a bit more about PHP, have a look at the Simple PHP video tutorials. These tutorials will help you learn how to work with PHP - from installing free PHP scripts that you can download on the internet, to learning how to write PHP. They also cover tasks such as setting up a MySQL database.
Form items
Email details:
Text displayed on button:
Email address to receive the form submission:
Subject of email:
Thank-you message:

Page will open in a new window



Site Stats     
VisitorsPageviews
Total: 8,562,551 Total: 22,978,598
Today: 252 Today: 549
Yesterday: 1,503 Yesterday: 4,617
Past Month: 46,593 Past Month: 143,127

1,437 visitors in the last 24 hours
This page has been visited 70,457 times
There are currently 8 visitors online
click to see where
most people online at once:
286 visitors on 06/27/2012
   You beaut











This site is © HTML Basix 2003 - 2009