Full tutorial, source here: http://www.html-form-guide.com/php-fo...
This PHP form validation tutorial explains how to add form validations to your form processing. It shows how to add 'required' validation to a text field like name. It also explains how to add validations to other input types like radio button groups, check box groups, drop down lists etc
More than just the validation checks, you have to make sure that the error messages are displayed properly and display the error message next to the field. If the validation fails, it should not clear all the form fields and have the user fill every thing again. This tutorial will also show how to re-fill the form values.