How do I put your contact form on my website?

Installing my PHP contact form into your existing website is super simple – no programming knowledge required!


Nothing too scary, I promise:

  • Your web server / web host must support PHP. The form supports everything from PHP4 / PHP 5 to PHP 7.4 (and if this means nothing to you, you probably won’t have to worry about it!)
  • Your host must allow use of the PHP mail() function — a few web hosts disable this to try and combat spam. If in doubt, ask your web host

That’s really it.

Installation Instructions

  • Download the mail form to your computer, extract the zip file and open the mail form “.txt” file
  • Customise the variables at the top of the file in a plain text editor (such as Microsoft Notepad). Do not use Microsoft Word or other rich text editors.
    To set the variables, add your chosen configuration between the quotation marks, e.g. if the e-mail address you want to receive the form mail at is, change $yourEmail = ""; to $yourEmail = "";
    In the Premium version of the form, change $primary_recipient = ""; to e.g. $primary_recipient = "";
    Save your changes.
  • Rename the .txt file to something suitable, e.g. contact.php. The file must be saved with a “.php” extension to work!
  • Upload to your web server … it’s ready to go!

Having Trouble Renaming the File?

If you use Microsoft Windows and don’t have common file extensions shown, when you rename the file, it may end up e.g. contact.php.txt. To get around this, you can open the file in Notepad, go to Save As… and enter the File name as "contact.php" (with the quotation marks). This overrides the default file extension.

Alternatively, upload the file to your server as .txt, and rename the file on your server.

More Help

Questions? Want to customise the appearance of the form? See the help & how-to

Get Premium

All the great features of the free contact form, and more besides...

Buy Now - £19

  • UTF-8 support: ideal if you receive mails containing characters such as é, ó, ü and so on
  • Even more spam protection: take advantage of better functionality in newer versions of PHP
  • Repeat submission protection: stop people from submitting the form multiple times in a row
  • Read more about the premium mail form...