php
include_once ("sql_connect.php");
include_once ("my_msg.php");
?>
会员主功能表
下面来看php登录
include_once("sql_connect.php");
include_once("my_msg.php");
?>
my_msg("字段不能为空!","login.php");
}
$sqlstr ="select * from member where id='".$_POST['id']."' and passwd='".$_POST['passwd']."' and status =1";
$result = mysql_query($sqlstr,$link);
$row = mysql_fetch_array($result,MYSQL_BOTH);
if(mysql_num_rows($result)==1 && $row["rank"]==100){
setcookie("cookie_chk","adm_logined");
setcookie("cookie_id",$_POST['id']);
my_header("adm.php");
}elseif (
mysql_num_rows($result)==1 && $row["rank"]==1){
setcookie("cookie_chk","logined");
setcookie("cookie_id",$_POST['id']);
my_header("main.php");
}else {
my_msg("登录失败,请重新等录!","login.php");
}
mysql_free_result($result);
mysql_close($link);
?>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号