HTML form
How does the website interact with users? The answer is to use HTML forms. The form can transmit the data entered by the viewer to the server, so that the server-side program can process the data passed by the form.
Grammar:
<form method="传送方式" action="服务器文件">
Explanation:
1.<form>: <form> tags appear in pairs, starting with <form> and ending with < ;/form>End.
2.action: The place where the data entered by the viewer is sent, such as a PHP page (save.php).
3.method: Data transmission method (get/post).
<form method="post" action="save.php"> <label for="username">用户名:</label> <input type="text" name="username" /> <label for="pass">密码:</label> <input type="password" name="pass" /> </form>
Note:
1. All form controls (text boxes, text fields, buttons, radio boxes, check boxes, etc.) must be placed Between the <form></form> tags (otherwise the information entered by the user may not be submitted to the server!).
2. Method: The difference between post/get. This part is a matter for back-end programmers to consider. Interested friends can check the wiki of this section, which has detailed introduction.