PHP HTML Form Generation and Validation Class is a PHP class for easy HTML form generation and validation.
If you're a web developer you know that designing HTML forms and writing the PHP code for their validation is a really dull task. And if you're like me you must've looked around the web to see what you can find in order to ease this task.
I made this class first of all because being addicted to coding, I just had to. But what had me really thinking, after looking at some of other's people work was: "cool, but what if I have to put the label on top of the text box and not to the left of it? or what if I have to put three controls in a row?" because the vast majority of the HTML form processors I've seen were just adding the controls one beneath the other and as a webdeveloper I can tell you, besides the login window, I was never asked to build a form where all the controls are just one beneath the other... Now, I am sure that in some of them there were workaround for these things but I wanted it really simple. Oh, and another thing: I wanted the error messages generated by the form validation to be wherever I wanted not just on top, not just on bottom. I want them wherever I feel like they're looking ok!
So that's why this PHP class is as straightforward as it gets: it provides an easy and intuitive way of handling both HTML form design - based on templates, where you can design your form any way you want, and basic server-side form validation. As this is a BETA version, currently there are only a few validation rules available but you can easily write custom validation rules, both for server-side and client-side.
It provides all the basic controls available in an HTML form plus a date picker control.
In order for the date control to work you must also download the PHP Date Picker Class from the downloads section and configure the PHP Form Generation and Validation Class by setting the datePickerPath property to point to the date picker class!
You'll get a better picture of what I'm trying to say by downloading the class and running the example and browsing through the documentation
Suggestions, comments and requests are welcomed.
The code is heavily documented so you can easily understand every aspect of it.
What's New in This Release:
· This release adds heavy XSS (cross site scripting) injection prevention.
· Previously, some accented characters were scrambled upon submission as htmlentities() was being called without the UTF-8 argument.
· An error has been fixed where, when having multiple forms on a page, all forms were processed upon submission.