PHP Scripts: 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.
Features
Stuff that comes as standard:
- Meta header and JavaScript injection protection
- Tags stripped and whitespace trimmed
- Validity and length checking on name and e-mail fields
- IP and browser details included in e-mail
- Valid data displayed when other errors occur
- Spam word check
- Common spam bot blocking
- New in v2: Bayesian style spam filtering
Install Instructions
- Save the contents of mail_form_v2.txt to your computer, and rename to suit (e.g. contact.php)
- Customise the variables at the top of the script ($yourEmail = "YOU@YOURWEBSITE.COM"; etc)
- Add your styling and make it pretty — customise the title of the page too.
- Upload... it's ready!
Adding Fields
To add fields to the form, simply edit the HTML form near the bottom of the file as you normally would:
Example text field
<label for="nickname">Nickname<label>
<input type="text" name="nickname" id="nickname" value="<?php get_data("nickname"); ?>" /><br />
Example drop-down menu
<select name="country" id="country">
<option value="United Kingdom">United Kingdom</option>
<option value="United States">United States</option>
<option value="Other">Other</option>
</select>

Welcome to the blog of girl geek & php ninja extraordinaire 'Jem'. Web developer, mum and supreme crazy cat lady..




![[bee]](/images/bee2.gif)
![[block]](/images/bird.gif)