<?php
if (session_status() === PHP_SESSION_NONE) {
    session_start();
}

$conn = mysqli_connect("localhost","root","","ecommerce");
if(!$conn){
    die("Database Error");
}

if(!isset($_SESSION['admin_logged_in'])){
    header("Location: login.php");
    exit;
}
?>
