View difference between Paste ID: evuWuFee and weKs6GeC
SHOW: | | - or go back to the newest paste.
1
<?php
2
/*
3
perhatikan cara pake isset
4
*/
5
session_start();
6
if(!isset($_SESSION['username'])) {
7-
    if(isset($_SESSION['position'])== '1') {
7+
8
    echo "<script>window.location='fpl_login.php'</script>";
9
}
10-
    if(isset($_SESSION['position'])== '2') {
10+
if(isset($_SESSION['position'])){
11
    if( $_SESSION['position'] == '1') {
12
    echo "<script>window.location='op.php'</script>";
13-
    if(isset($_SESSION['position'])== '3') {
13+
14
    if( $_SESSION['position'] == '2') {
15
    echo "<script>window.location='foo.php'</script>";
16-
    if(isset($_SESSION['position'])== '4') {
16+
17
    if( $_SESSION['position'] == '3') {
18
    echo "<script>window.location='bo.php'</script>";
19-
?>
19+
20
    if( $_SESSION['position'] == '4') {
21
    echo "<script>window.location='hq.php'</script>";
22
    }
23
}else{
24
    echo "tak ada session position";
25
}