Commit b12f3e0c by Mei Romauli Sagala

perubahan login sesuai role user

parent 13019915
...@@ -8,14 +8,14 @@ if(isset($_GET['do_login'])){ ...@@ -8,14 +8,14 @@ if(isset($_GET['do_login'])){
if($login == false){ if($login == false){
$_SESSION['login_error'] = TRUE; $_SESSION['login_error'] = TRUE;
}else{ }else{
$_SESSION['is_logged_in'] = TRUE; $_SESSION['user'] = TRUE;
header("location:index.php"); header("location:index.php");
} }
$log =getAdmin($_POST['username'],$_POST['password']); $log =getAdmin($_POST['username'],$_POST['password']);
if($log == false){ if($log == false){
$_SESSION['login_error'] = TRUE; $_SESSION['login_error'] = TRUE;
}else{ }else{
$_SESSION['is_logged_in'] = TRUE; $_SESSION['admin'] = TRUE;
header("location:list_menu.php"); header("location:list_menu.php");
} }
if(isset($_SESSION["login_error"])){ if(isset($_SESSION["login_error"])){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment