#2 Create and populate a database && realistic and practical applications (Part 2)

Source: Internet
Author: User

Extends from the last chapter, this chapter takes a look at some real-world problems so can occur as you move your APPL Ication

From testing to a live website, Through This chapter you'll learn more important PHP and SQL code.

First problem:its never safe to assume a Web form would be used exactly the the-it was intended.

So try and head off these kinds of problems by anticipating that some users would misuse your forms.

So the form is in need of validation, which is the process of checking to make sure form data is OK before doing anything With it.

Validation means making the data you get are the data you expect.

Above the last project, we should add some code to sendemail.php this examines the values in the text boxes and checks to Make

Sure they aren ' t empty. If Everything checks out OK, the script is sends out the emails.

Just A tip here:you can also validating data on the client by JavaScript. But the server was the last line of defense-catching bad form data,

So server-side validation can ' t is ignored even if you had checked the data on the client-side.

#2 Create and populate a database && realistic and practical applications (Part 2)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.