Commit 88cd8d26 authored by Maneesha Fernando's avatar Maneesha Fernando

changes

parent e9b0cd9a
<?php <?php
// Check if session is not already started, then start it. // Check if session is not already started, then start it
if (session_id() == '' || !isset($_SESSION)) { if (session_id() == '' || !isset($_SESSION)) {
session_start(); session_start();
} }
// Check if $_SESSION["type"] is set and not empty // Check if $_SESSION["type"] is set and not empty
if (!isset($_SESSION["type"]) || empty($_SESSION["type"])) { if (isset($_SESSION["type"]) && $_SESSION["type"] !== "") {
// The session variable "type" is set and not empty
} else {
header("location:index.php"); header("location:index.php");
exit(); // Add an exit to prevent further execution exit(); // Add an exit to prevent further execution
} }
......
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