登陆验证代码

<!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>

posted on 2012-06-11 14:29  0fengfan0  阅读(93)  评论(0编辑  收藏  举报

导航