Hi Stackoverflow members!
Problem
Main file:
<?php
$privileges = $_SESSION['privileges'];
switch ($privileges) {
case "admin":
echo '';
break;
case "user":
echo '';
break;
default:
header("location: nologon.php");
}
?>
"head.php" file:
<?php
error_reporting(0);
include('connect.php');
session_start();
?>
<head>
<meta charset="utf-8">
<!--<?php include('./assets/js/block_mouse.min.js') ?>
<?php include('./assets/js/block_ctrl.min.js') ?>-->
<link href="assets/img/soccer.ico" rel="icon" type="image/x-icon" />
<link rel="stylesheet" href="./assets/css/stylesheet.css">
<script type="text/javascript" src="./assets/js/jquery.min.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap.min.js"></script>
</head>
The server wont redirect clients to the "nologon.php" page when they aren't logged in. All the other pages and PHP codes works perfectly, but this don't?
Screenshots:
Main file:
http://gyazo.com/cc7836bfddaceff4d1f4c27cbb05d67e
head.php file:
http://gyazo.com/b1f67ad03081e4e958b2d673ac7e3316
- Thanks in advance!