PHP form and user input signature. PHP form processing form example: & lt; html & gt; PHP form and user input
Http://taobeibei.iteye.com/blog/615431
PHP $ _ GET and $ _ POST are used to retrieve values in the form, such as user input.
PHP form processing form example:
The preceding HTML page contains two input boxes and a submit button. When you enter the form and click the submit button, the data in the form will be sent to the "welcome. php" file.
The "welcome. php" file is similar to the following:
Welcome
.
You are
Years old.
The output sample of the script above is similar to this:
Welcome John. You are 28 years old.
In the next chapter, we will explain PHP $ _ GET and $ _ POST.
Form verification
User input should be verified whenever possible. Client verification is faster and server load can be reduced.
However, any site with high traffic has to worry about server resources and the security of the site. If the form accesses the database, it is very necessary to use server-side verification.
A good way to verify a form on the server is to pass the form to itself, rather than jump to different pages. In this way, you can get an error message on the same form page. Users are more likely to find errors.