PHP is one of the most popular means of processing HTML forms.
This website will show you how to process PHP form and send form results to your e-mail address. This tutorial has emphasis on processing PHP forms with security in mind!
There are too many tutorials out there that rely on PHP's notorious register_globals setting activated with very little or no form input validating.
Proper validation of form input data is the most important step in protecting your form from hackers and spammers! If you have at least basic understanding of HTML and PHP you shouldn't have any problems with this tutorial. We are open to well-intended comments, critics and suggestions.
For example, if you have set length limit in the database for a text input, it is better to do the validation before it actually gets cut off by the database system or even getting an error thrown.
This article will explain the basics in creating an email form that validates the inputs, produces errors when inputs are typed incorrectly, and send an email to you when submitted.
Below is the code you will use to validate whether the inputs have valid data or not.
You will not learn HTML here and this is also not a complete PHP tutorial, but rather a tutorial on working with HTML forms in PHP. Please do contact us with your comments and suggestions.
» PHP forms tutorial The first part of this website is a tutorial about handling HTML forms with PHP. » Did this website help you get your first form working? Copying or redistributing any part of this website without our written permission is expressly forbidden!