Categories

Updated: 11/28/2001

PHP Form Validation Class

Form_Validator Class is a PHP object that can be used to validate the presence of HTML form data. By &"validating&", the function simply checks if a variable is NOT NULL. The class is intended to be called AFTER the end-user has submitted an HTML form. The class is first initiated, then the validate_fields function is called by passing the field names of all the required form fields. If any of the variables (field names) are NULL the function returns FALSE, along with an error message of which fields are null. If all the variables are NOT NULL, the function returns TRUE. Form_Validator Class has the ability to check multiple fields at once, and check that at least one field in a group of many has been filled in by the end-user (&"Please enter your Home Phone OR your Work Phone&").
©2019 A--9.com