Validating form data php
A common web task in web application development is to validate data input by a user.
This allows a user to scan down a form and fix all their errors in a single pass.
To accomplish this, I use an array called $form_errors.
This is because I generally only want to display one error per field or because failing one validation may make other rules invalid.
For example, if a required field is left blank, you want to display that the field is required.
It is also a good security practice to limit the data that a web based form will accept.