<?php

ob_start();

/*
//LOCAL CONN
$server_name = "localhost";
$server_username = "root";
$server_password = "";
$database = "invoicemgsys";

*/


$servername = "localhost";
$username = "root";
$password = "";
$db = "vqhnyjrs_invoicing";


$conn = mysqli_connect($servername, $username, $password, $db);


session_start();
 
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
   echo"
<script>
    alert('Please Re-login to gain Access');
    window.location.href = 'sign-in.php';
    </script>
";
    exit;
}
?>