Login login,php Login Login in PHP
Login
Phprequire".. /include/dbclass.php "; $username=$_post[' UserName ']; $password=$_post[' Password ']; if(Empty($username) ||Empty($password) {go_msg ("Please fill in the user name, password!" ",".. /default.html "); Exit; } dbconn (); $password=MD5($password); $SQL= "Select Username,usertype,userpass from SiteUser where Username= '".$username. "' and userpass= '".$password. "' and Isopen=1"; //echo "$SQL";$result=$db-Exec_sql ($SQL); $total=mysql_num_rows($result); if($total==0) {dbclose (); Go_msg ("Registered users have not passed the administrator audit or user name and password does not match!" Please re-enter! ",".. /default.html "); Exit; }Else{ $Rs=$db-Fetch_array ($result); //attached value, and login Session_register("username"); Session_register("Usertype"); $_session["Usertype"]=$Rs[' Usertype ']; $_session["Username"]=$username; //echo $_session["username"]; if($_session["Usertype"]==1) {go_msg ("Successful Landing!" "," default.php "); //header (' location:http://163.com '); } if($_session["Usertype"]==2) {go_msg ("Successful Landing!" ",".. /user2/default_1.php "); } if($_session["Usertype"]==3) {go_msg ("Successful Landing!" ",".. /user3/default_2.php "); } //header (' Location:default.php ');} dbclose (); //how to ask Hovertree.com?>
Recommendation: http://www.cnblogs.com/roucheng/p/phpdongtai.html
http://www.bkjia.com/PHPjc/1135180.html www.bkjia.com true http://www.bkjia.com/PHPjc/1135180.html techarticle Landing in PHP login,php login login login? php require ". /include/dbclass.php "; $username = $_post [' username ']; $password = $_post [' Password ']; if (Empty ($username) | | ...