require("../include/config.php");
if($Submit) //注:submit为 提交 按钮的name{
$sql="select * from admin_user where username='$username'
//注admin_user为一个表
and password='$password'";
$result=mysql_query($sql,$connect);//本函式送出 $sql 字串供 MySQL 做相关的处理或者执行。
$rows=mysql_num_rows($result);//传回符合查询条件的列的数目
if($rows=0)
{
echo ("错误的用户名或密码!");
}
else
{
echo("欢迎你的登陆");
}
}
if($Submit) //注:submit为 提交 按钮的name{
$sql="select * from admin_user where username='$username'
//注admin_user为一个表
and password='$password'";
$result=mysql_query($sql,$connect);//本函式送出 $sql 字串供 MySQL 做相关的处理或者执行。
$rows=mysql_num_rows($result);//传回符合查询条件的列的数目
if($rows=0)
{
echo ("错误的用户名或密码!");
}
else
{
echo("欢迎你的登陆");
}
}
$numrows = mysql_num_rows($result);
if($numrows==0)
{
echo ("错误的用户名或密码!");
}
else
{
echo("欢迎你的登陆");
}