<?php 
// Increase session timeout to 1 month (2592000 seconds)
ini_set('session.gc_maxlifetime', 2592000);
ini_set('session.cookie_lifetime', 2592000);

// Ensure cookies are secure (Required for PWA)
ini_set('session.cookie_secure', '1'); 
ini_set('session.cookie_httponly', '1');
ini_set('session.use_only_cookies', '1');

session_start(); 
$dbHost     = "localhost"; 
$dbUsername = "erpsyste_snauser"; 
$dbPassword = "1ZASQ#yXyGA1"; 
$dbName     = "erpsyste_snadb"; 

$con = mysqli_connect($dbHost,$dbUsername,$dbPassword,$dbName);
$con->query("SET NAMES 'UTF8'");

// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

error_reporting(0);