Created
January 15, 2018 00:54
-
-
Save wichaksono/dabb7de798776cbda522b11f53a03dad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); | |
/** | |
* Jika Tidak login atau sudah login tapi bukan sebagai admin | |
* maka akan dibawa kembali kehalaman login atau menuju halaman yang seharusnya. | |
*/ | |
if ( !isset($_SESSION['user_login']) || | |
( isset($_SESSION['user_login']) && $_SESSION['user_login'] != 'member' ) ) { | |
header('location:./../login.php'); | |
exit(); | |
} | |
?> | |
<h2>Hallo Member <?=$_SESSION['nama'];?> Apakabar ?</h2> | |
<a href="./../logout.php">Logout</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment