twzContact is a PHP script that makes it easy to create a custom contact page on your web site. The contact page allows your visitors to enter details into a form, which generates an email to you containing the details entered. The visitor (or any spambot) cannot find out your email address from this page. For advanced users, twzContact can be extended with your own custom PHP code to process the submitted data in other ways.


The twzContact system consists of four main parts:

twzContact.phpthe main script that does all the work. This component is the same for all sites using twzContact.
Settings filethis file indicates the fields that should appear on the form and in what order, where to send the email, and other settings specific to your site.
CSS stylescustomise how the form looks, for example the alignment of labels, size of input boxes, and colours of missing fields.
Web pagea normal HTML page (usually with .php file extension) that contains the header, graphics and navigation links consistent with the rest of your site. However instead of the normal page content, it will include a short text snippet that turns the page into a twzContact page.

It's easy to get started with twzContact. Although it has some quite advanced options, make sure you can walk before you try running! Start with a simple form, then you can add more fancy fields and options once you're familiar with how twzContact works.

The simplest example

The simplest example

You can make your contact form as fancy as you like with twzContact, but for a plain form the requirements are minimal:

The only requirements for the settings file are the ToAddress (where the email will be sent) and at least one field in the [Fields] section.

Of course you will probably want a few more fields on your form, and for the form to look nicer - any part of the form can be styled to your liking with CSS.


Many features for your form

More information

Find out more by following the links at the top of this page, or head to the twzContact download page to get started! Also check out the example forms for some styling ideas.

Here's a silly example (image only) to demonstrate that you can have as many fields as you want!