Home > Backend Development > PHP Tutorial > Use session to determine user login permissions (super simple)_PHP tutorial

Use session to determine user login permissions (super simple)_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 15:08:31
Original
1187 people have browsed it

As shown below:

Copy the codeThe code is as follows:

Username:

Password:


session_start();
$_SESSION["user"]=$_POST[user];
$_SESSION["password"]=$_POST[pwd];
if($_SESSION[user]==""){
echo "";
}

if($_SESSION["user"]=="admin"){
echo "Current login: System Administrator
User Management< /a>";
}else{
echo"Current login: ".$_SESSION[user]."
My Album";
}
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327477.htmlTechArticle is as follows: Copy the code as follows: form action="#" method=post Username: input type= text name=userbr Password: input type=password name=pwdbr input type=submit name=sbum...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template