10 days Learn PHP Day 9

web front end three thousand eight hundred and seventeen 13 years ago (2011-04-08)

Learning purpose: precautions

Because I learned first ASP Therefore, when doing PHP again, I will find many places to adapt.

1. Be careful not to miss the semicolon

2. Be careful not to omit the$

3. Be careful not to miss the session when using SESSION_ start();

If an error occurs, the following methods can be used:

1. If there is an error in the SQL statement, comment and output the SQL statement. Note that you should also comment and call the subsequent execution SQL statement

2. If the variable is empty, most of them are not passed in place. Check the output variable, the form ID and name

3. If yes data base Connection error, check whether MY SQL is opened correctly and whether the connection statement is missing

4. Pay attention to indent, and eliminate the error of unmatched brackets

When building a large website, my idea is to first build a database to determine the role of each field and the relationship between each field and the table. Then design the background interface, starting from adding data, because whether the addition is successful can be directly verified in the database, and the page that is added and displayed is completed, and finally the combination of the two. Generally speaking, the background includes adding, deleting, modifying and displaying. There is no problem in the background and there is no major problem in the foreground. The foreground also needs to pay attention to security, fault tolerance and output format.

Ok, let's talk about how to upload files and send emails in PHP tomorrow.