请大家帮忙CHECK一下
请大家帮忙CHECK一下<?php$username = "$_POST['username']";
$pwd = "$_POST['password']";
$errmsg = "";
if (empty($username))
$errmsg = "数据输入不完整";
if(empty($errmsg)) {
$find = "SELECT * FROM user WHERE username='$username' AND password='$pwd'";
$rs = $db->query($find);
if ($rs && $rs->num_rows > 0) {
session_start();
$_SESSION["user"] = $username;
$errmsg = "<meta http-equiv='refresh' content='0; url=index.php' />";
$find = "WHERE username='$username'";
$db->query($find);
}
else {
$errmsg = "用户名或密码不正确,登录失败!";
}
?> 帮顶一下,发错地方了吧,这很快就沉的
页:
[1]