新建一个login文件,里面存放的就是用户登录的模块。
<html><head><meta charset="utf-8"><style type="text/css"></style><script type="text/javascript"></script></head><body></body></html>
在body中贴如以下代码:
<h1>用户登录</h1><form action="login.php" method="POST"><table><tr><td>请输入用户名:</td><td><input type="text" name="username"></td></tr><tr><td>请输入密码:</td><td><input type="password" name="password"></td></tr><tr><td></td><td><input style="float:right;" type="submit" name="submit"></input></td></tr></table></form>
最终表单提交地址为login.php,具体的业务逻辑会在下一节给出。