Just learn the HTML form, the data is not handed up, and later learned that the HTML is not able to make data.
When you learn PHP, you also know that PHP and HTML will not be able to make data, but also the support of the database.
Just beginning to learn is to form.html and form.php separate, and later see the book only need a form.php on the line, so specialized carefully looked at the difference between the two, afraid later forget, now write down.
The former, is to put the form of the rules or the description of the form.html inside, after filling the things, click the button,<form> the following Action property will start the event, jump into the form.php inside, perform verification blank things.
The latter, like function, think differently.
Enter form.php This form page, first with the IF statement to check whether the form has been submitted, if not to detect the integrity of the form, if not, then output an HTML-written form, after the user has written, click Submit, or Action property departure event, back to form.php this form, in accordance with the order, Check that you have submitted the form, and then detect the integrity of the form, everything OK ~ ~ ~ to identify the creation of a cookie and assign a way to identify already logged in: $loggedin =ture;
In this process, how to verify that the user has not written anything? Use the "!empty ()" Function!
As for how to verify that the data entered by the user is correct, the next step is to understand the interaction with the database.