[PHP] HeadFirst-PHP & MySQL (chapter 1 summary) compared with front-end technologies such as HTML and CSS, PHP is mainly used to Lifecycle static pages and enhance user interaction experience, let us know what the visitor is thinking, so as to dynamically generate HTML Web pages.
Specifically, the HTTP flowchart is as follows. as an example in the book, e-mail is finally sent from the client, which involves not only client mailbox binding, but also other issues, it also makes people feel that it is useless to enter the form in vain.
PHP will return the information to the server for sorting after the customer fills in the information, then return a message submission confirmation interface, and then send the email through the server, this improves the quality of communication with users, and all information operations are completed on the client.
PHP scripts are always run on the server. by interpreting the PHP script on the server, you can send HTML Web pages to the client, and send emails.
Summary of other small knowledge points:
-
The form is connected to a PHP script through the action attribute of the form element, causing the script to run when the form is submitted. For example, use the post method to connect to report. php.
-
$ POST is a special variable called a super global variable, which directly helps the form submission method used by HTML forms. If the method is set to post, all form data is packaged into the $ POS Super global variable.
-
The echo command directly outputs the returned HTML code to the Web browser echo 'was Fang there? '. $ Fang_spotted;
-
PHP built-in mail () function: mail ($ to, $ subject, $ msg );