if($_SERVER['REQUEST_METHOD'] == "POST")
{
$Username = $_POST['Username'];
$Userpass = $_POST['Userpass'];
$sql = "SELECT Userpass FROM `user` WHERE Username = '$Username'";
$chk = mysql_query($sql,$connect);
$query = mysql_fetch_array($chk);
if( $query[0] == $Userpass )
{
echo "<html>
<head>
<meta http-equiv='refresh' content='5'; url='$url'>
</head>
<body>
<center><table>
<tr>
<td>登陆成功!</td>
</tr>
<tr>
<td><a href='index.php'>等待5秒跳转到首页,或者直接点这里返回</a></td>
</tr>
</table></center>
</body>
</html>";
}
else
{
echo "<html>
<head>
<meta http-equiv='refresh' content='5'; url='$url'>
</head>
<body>
<center><table>
<tr>
<td>用户名或者密码错误!</td>
</tr>
<tr>
<td><a href='index.php'>等待5秒跳转到首页,或者直接点这里返回</a></td>
</tr>
</table></center>
</body>
</html>";
}
}
{
$Username = $_POST['Username'];
$Userpass = $_POST['Userpass'];
$sql = "SELECT Userpass FROM `user` WHERE Username = '$Username'";
$chk = mysql_query($sql,$connect);
$query = mysql_fetch_array($chk);
if( $query[0] == $Userpass )
{
echo "<html>
<head>
<meta http-equiv='refresh' content='5'; url='$url'>
</head>
<body>
<center><table>
<tr>
<td>登陆成功!</td>
</tr>
<tr>
<td><a href='index.php'>等待5秒跳转到首页,或者直接点这里返回</a></td>
</tr>
</table></center>
</body>
</html>";
}
else
{
echo "<html>
<head>
<meta http-equiv='refresh' content='5'; url='$url'>
</head>
<body>
<center><table>
<tr>
<td>用户名或者密码错误!</td>
</tr>
<tr>
<td><a href='index.php'>等待5秒跳转到首页,或者直接点这里返回</a></td>
</tr>
</table></center>
</body>
</html>";
}
}
解决方案 »
- 求正则表达式(?<=[^\]a-z0-9-=\"'\\/])这块什么意思
- 维护别人开发的项目,某个页面的php代码返回0,但是浏览器上显示abc,0
- php tidy 接口的问题。
- 目录结构的表达
- 请问用PHP,要不要专用的语言编译工具?不太懂,但急着要用!请各位指点。
- 求助,RTX腾讯通怎样用http访问发送短信
- PHP开发工程师(上海徐家汇)
- [求助]谁有PHP-Nuke 7.5.0的安装教程?
- 对于php编辑器的感想,顺便中秋节散分
- 请问,如何用fsockopen打开http://213.91.134.3
- PDF问题
- 有没有在facebook,manyou,myspace上开发应用的朋友?可以交流下么?
谢谢你