您的位置:首页 > 编程语言

登陆验证代码

2012-06-11 14:29 211 查看
<!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=utf-8" />
<title>无标题文档</title>
</head>

<body>
<?
$username=$_POST["username"];
$password=$_POST["password"];
$checknum=$_POST["checknum"];

$link=mysql_connect("localhost","x0936008","x0936008");
mysql_query("set names utf8");
mysql_select_db("x0936008",$link);
$sql="select * from admin where username='".$username."'";
$result=mysql_query($sql);
$row=mysql_num_rows($result);
$info=mysql_fetch_array($result);
if($row<1)
{
echo "<script language=javascript>alert('该用户还未注册,请先注册!');location.href='index.php';</script>";
}
for($i=1;$i<=$row;$i++)
{
echo $info['username'];
}
?>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: