📄 load_check.php
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<?
include("head.inc");
$user_id=$_POST[username];
$password=$_POST[password];
$cookie=$_POST[cookie];
//echo $user_id;
//echo $password;
//echo $cookie;
include("db_start.inc");
$sql="SELECT * FROM web_user WHERE user_id='$user_id'and password='$password'";//sql语句
$result = mysql_query($sql);
$row=mysql_fetch_row($result);//判断有没有记录;
if($row)//有记录 setcookie
{ echo "loading";
setcookie("test","",time()-1800);//重设cookie
setcookie("test","$user_id",time()+$cookie);//只有登陆之后才可以设置cookie
header("Location: show.php");
}
else
echo "<script> alert('输入错误!');history.back();</script>";
?>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -