Home >Backend Development >PHP Tutorial >An in-depth discussion on how to implement PHP forms_PHP Tutorial

An in-depth discussion on how to implement PHP forms_PHP Tutorial

WBOY
WBOYOriginal
2016-07-15 13:31:32796browse

The output sample of the script above is similar to this: Welcome John.

You are 28 years old.


Note : $_GET and $_POST should be capitalized. You can try writing them in lowercase to see what errors will occur

We will explain PHP $_GET and $_POST in the next chapter.

PHP form validation

User input should be validated whenever possible. Validation is faster on the client side and reduces the load on the server.

However, any site with such high traffic that it has to worry about server resources also has to worry about the security of the site. If the form accesses a database, it is very necessary to use server-side validation.

A good way to validate PHP forms on the server is to pass the form to itself, rather than jumping to a different page. This way users can get error messages on the same form page. It will be easier for users to find errors.


http://www.bkjia.com/PHPjc/446213.html

truehttp: //www.bkjia.com/PHPjc/446213.htmlTechArticleThe output sample of the above script is similar to this: Welcome John. You are 28 years old. Note: $_GET and $_POST must be capitalized. You can try to see what errors will occur if you write them in lowercase...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn