Secure PHP Mail Form

Free PHP Mail Form is a single-page multi-use PHP mail (e-mail) website form that allows your users to send you feedback directly from your website, without the need to customise heavily detailed scripts and panic over security.

Download Options

Download the mail form to your computer, and re-name it to suit your website (e.g. to contact.php). Please note: you must find the form action code in the script (e.g. <form action="mail_form_v2.php" method="post">) and set the action attribute to whatever you decide to name the form file.

Features

Stuff that comes as standard:

Install Instructions

Follow these for best results:

Version 1

Version 2

Adding Fields

To add fields to the form, simply edit the form HTML near the bottom of the file. To ensure that submitted data is placed back in the form if an error occurs, be sure to use the get_data() function with the name of the field placed inside. E.g. to add a nickname field, you would add:

<label for="nickname">Nickname<label><input type="text" name="nickname" id="nickname" value="<?php get_data("nickname"); ?>" /><br />

Notice how the name and id attribute values are the same as the value between the quotation marks inside the get_data() function? Note: get_data() does not work with radio buttons, checkboxes and drop-down menus.

Disclaimer

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.



Subnavigation: Scripts