In Part 1 of this tutorial series, we created the core of our Class. In Part 2 here, we learn how to expand on our Class to allow form fields to be validated as well as returning and generating the many error messages when validating.
This article will touch on two skills in the interface between PHP and HTML forms, specifically in working with hidden fields, and as a bonus, in passing arrays in an HTML form.
Form validation the process that occurs after the user clicks the submit button and before the form data processed by a PHP, JAVA or CGI program. In this tutorial, you'll learn how to intercept the submission and pass the form data through one validation tests. At the end of this tutorial, youŽll have a complete form validation framework in php wich can be seemless integerate in existing web applications.
Platform(s): Linux, Windows, FreeBSD, Mac OSX, Sun Solaris
Learn how to create an HTML form and how to program a simple PHP page to process the information of that HTML form. A basic knowledge of HTML will make this tutorial easier.
Using PHP array functions to view all of your POST/GET Variables make it easy for retrieving data from online forms. It's also great for debugging your codes.
Ever wondered how you can use a form to log someone in, or get information from the user and drop it into a database? This is a good example of how to get all of the info from those elusive cells. It also shows you how to make sure that they don't leave a field blank.