One of the most popular ways to make a web site interactive is the use of forms. With forms you can have users register for different things, submit any information you can imagine, upload files, and all types of other things. In this tutorial, we will go through the basics of forms and how to handle the data that comes from those forms with PHP.
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.
A collection of 21 tips on process Web forms with PHP scripts. Clear explanations and tutorial exercises are provided on generating and processing Web forms, getting values out of $_REQUEST, processing multiple choices, removing slashes, adding multiple submit buttons, adding hidden values, processing original query string:
How To Retrieve the Submitted Form Data?
How To List All Values of Submitted Fields?
How To Retrieve Input Values for Checkboxes Properly?
How To Remove Slashes on Submitted Input Values?
How To Support Multiple Submit Buttons?
How To Support Hidden Form Fields?
How To Retrieve the Original Query String?
How To Protect Special Characters in Query String?
...
Platform(s): Linux, Windows, FreeBSD, Mac OSX, Sun Solaris
This set of functions allows you to use simple PHP commands to generate complex forms containing many different inputs. It automatically outputs the HTML code for the form and makes it easy for you to process the input when the form is submitted.