</body> The HTML page example above </html> contains two input boxes and a submit button. When the user fills out the form and clicks the Submit button, the form's data is sent to the "welcome.php" file.
The "welcome.php" file looks like this: <html> <body>
Welcome <?php echo $_post["name";? >.<br/> You are <?php echo $_post[' age ';?> perton old.
</body> </html> the output sample from the script above is similar to this:
Welcome John. You are are Perton old. We'll explain PHP $_get and $_post in the next chapter. Form validation User input should be validated whenever possible. The client is validated faster and can reduce the load on the server.
However, any traffic is so high that you have to worry about the server resources of the site, it is also necessary 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 a form on the server is to conveys it to itself rather than jump to a different page. This allows the user to get an error message on the same form page. Users are also more likely to find errors.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.