?? login_chk.php
字號:
<?
include_once("sql_connect.php");
include_once("my_msg.php");
?>
<?
//檢查資料
if($_POST['id']=='' or $_POST['passwd']==''){
my_msg("字段不可空白","login.html");
}
$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.html");
}
mysql_free_result($result);
mysql_close($link);
?>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -