php登录系统身份验证

来源:百度知道 编辑:UC知道 时间:2024/05/29 03:18:52
通过html页面提供登陆窗口,根据用户的输入,用php执行sql语句来查找当前用户帐号的密码,找不到,显示用户名不存在,找到了根据用户输入的密码对比,不一致显示错误,一致就跳转到登陆后的页面。
求上面程序的代码!!!

login.html

<form id="form1" name="form1" method="post" action="checklogin.php">
<table width="400">
<tr>
<th width="27%" scope="row">用户名</th>
<td width="73%"><input name="user_name" type="text" id="user_name" /></td>
</tr>
<tr>
<th scope="row">密码</th>
<td><input name="user_pwd" type="password" id="user_pwd" /></td>
</tr>
<tr>
<th scope="row">请填写答案 </th>
<td><input name="yzm" type="text" id="yzm" size="5" />
123</td>
</tr>
<tr>
<td colspan="2" scope="row">