Home >Backend Development >PHP Tutorial >An in-depth discussion on how to implement PHP forms_PHP Tutorial
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 validationUser 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