<Form name = "form" method = "post" action = "login. php"> </form>
Text Box usage:
<Input type = "text" name = "username"/>
Among them, the input types include text, password, and so on. HTML5 adds a lot of input types. If you want to learn this type of knowledge, you can have a good understanding, because the finer the score, the more convenient it is to use.
Check the functions of this instance.
After filling in the form and submitting it:
Implementation Code:
Copy codeThe Code is as follows: <table width = "283" height = "85" border = "1" cellpadding = "0" cellspacing = "0">
<Form name = "name1" method = "post" action = "abc. php">
<Tr>
<Td width = "114" height = "30" align = "center"> administrator: </td>
<Td width = "163" height = "30" align = "center"> <input name = "username" type = "text"/> </td>
</Tr>
<Tr>
<Td align = "center"> password: </td>
<Td height = "30" align = "center"> <input name = "password" type = "password"/> </td>
</Tr>
<Tr>
<Td> </td>
<Td height = "25"> <input name = "submit" type = "submit" value = "submit"/> </td>
</Tr>
</Form>
</Table>
<? Php
If (! Isset ($ _ POST ['submit '])
Return;
If ($ _ POST ['submit '] = 'submit '){
$ Username = $ _ POST ['username'];
$ Password = $ _ POST ['Password'];
}
Echo <EOT
<Table width = "284" border = "1" cellpadding = "0" cellspacing = "0">
<Tr>
<Td height = "25" align = "center"> administrator: $ username </td>
</Tr>
<Tr>
<Td height = "25" align = "center" valign = "middle" class = "style2"> password: $ password </td>
</Tr>
</Table>
EOT;
?>
Use the isset () function to determine whether $ _ POST ['submit '] is set