Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- perhatikan cara pake isset
- */
- session_start();
- if(!isset($_SESSION['username'])) {
- echo "<script>alert('YOU MUST LOGIN FIRST');</script>";
- echo "<script>window.location='fpl_login.php'</script>";
- }
- if(isset($_SESSION['position'])){
- if( $_SESSION['position'] == '1') {
- echo "<script>window.location='op.php'</script>";
- }
- if( $_SESSION['position'] == '2') {
- echo "<script>window.location='foo.php'</script>";
- }
- if( $_SESSION['position'] == '3') {
- echo "<script>window.location='bo.php'</script>";
- }
- if( $_SESSION['position'] == '4') {
- echo "<script>window.location='hq.php'</script>";
- }
- }else{
- echo "tak ada session position";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement