Extends from the last chapter , This chapter takes a look at some real-world problems that can occur as you move your application
from testing to a live website, Through this chapter you will learn more important PHP and SQL code.
First Problem : Its never safe to assume a web form will be used exactly the way it was intended.
SO try and head off these kinds of problems by anticipating that some users will 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 is the data you expect .
Above the last project, we should add some code to sendemail.php that examines the values in the text boxes and checks to make
sure they aren‘t empty. If everything checks out OK, the script sends out the emails.
Just a tip here: you can also validating data on the client by JavaScript. But the server is the last line of defense for catching bad form data,
So server-side validation can‘t be ignored even if you have checked the data on the client-side.