php中的登陆login_PHP教程
login
require "../include/DBClass.php";
$username=$_POST['UserName'];
$password=$_POST['Password'];
if(empty($username) || empty($password)){
Go_Msg("请填写用户名,密码!","../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("注册用户还没有通过管理员审核或用户名及密码不符!请重新输入!","../default.html");
exit;
}else{
$Rs = $db -> fetch_array($result);
//附值,并登录
session_register("username");
session_register("usertype");
$_SESSION["usertype"]=$Rs['UserType'];
$_SESSION["username"]=$username;
//echo $_SESSION["username"];
if ($_SESSION["usertype"]==1){
Go_Msg("登陆成功!","default.php");
//header('Location:http://163.com');
}
if ($_SESSION["usertype"]==2){
Go_Msg("登陆成功!","../user2/default_1.php");
}
if ($_SESSION["usertype"]==3){
Go_Msg("登陆成功!","../user3/default_2.php");
}
// header('Location:default.php');
}
DBClose();
?>

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











Ubuntu 및 Debian용 PHP 8.4 설치 및 업그레이드 가이드

PHP 개발을 위해 Visual Studio Code(VS Code)를 설정하는 방법
