Functions for validations of the forms in PHP