Author: Sun Movement
Forms are the fastest and easiest way to add interactive functionality to your site. Forms allow you to ask your customers if they like your product, let casual visitors to your site leave a review, or ask pretty girls for their phone numbers. PHP can greatly simplify data processing based on web form submissions - as shown in our first example below:
----------------- -------------------------------------------------- -------------
< html>
< head>
< basefont face="宋体">
< /head> ;
< body>
< center>
< form method="GET" action="login.php">
< table cellspacing=" 5" cellpadding="5" border="0">
< tr>
< td>
< font size="-1">What is your name? ?< /font>
< /td>
< td align="left">
< input type="text" name="name" size="10">
< /td>
< /tr>
< tr>
< td colspan="2" align="center">
< input type="submit">
< /td>
< /tr>
< /table>
< /form>
< /center>
< /body>
< /html>
--------------------- -------------------------------------------------- --------
The most noteworthy thing about the entire page is the < FORM> tag
-------------------------- -------------------------------------------------- ----------
< form method="GET" action="login.php">
...
< /form>
-------------------------------------------------- ----------------------------------
You may already know, the ACTION attribute of the < FORM> tag The value explicitly specifies the name of the server-side script that will handle the information entered in the form - in this case "login.php", while the METHOD attribute describes how the information will be sent.