Ec (2); & lt ;? Php & nbsp; include_once (& quot; SQL _connect.php & quot;); & nbsp; include_once (& quot; my_msg.php & quot;); & nbsp ;? & Gt; & lt; html & gt; & lt; head & gt; & lt; metahttp-equiv & quot; content-type & quo script ec (2 ); script
Include_once ("SQL _connect.php ");
Include_once ("my_msg.php ");
?>
</Head>
If (isset ($ _ COOKIE ['cookie _ chk']) {
If ($ _ COOKIE ['cookie _ chk']! = "Logined "){
My_msg ("Logon Failed. Please log on again! "," Login. php ");}
} Else {
My_msg ("Logon Failed. Please log on again! "," Login. php ");}
?>
Welcome Enter the member Area
Member Main Menu </p>
Change Password
Next let's take a look at php Login
Include_once ("SQL _connect.php ");
Include_once ("my_msg.php ");
?>
My_msg ("field cannot be blank! "," 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 ("Logon Failed. Please wait again! "," Login. php ");
}
Mysql_free_result ($ result );
Mysql_close ($ link );
?>