<?php
// Global path configuration resolution logic
$directory = "Social-Media-Contents-Scheduler"; 

$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http";
$base_url = $protocol . "://" . $_SERVER['HTTP_HOST'] . "/" . $directory . "/"; 

if (!defined('BASE_URL')) {
    define('BASE_URL', $base_url);
}

// Database Connection Settings
$host = "localhost";
$user = "root"; 
$pass = ""; 
$dbname = "swarna_scheduler";

$conn = mysqli_connect($host, $user, $pass, $dbname);

if (!$conn) {
    die("Database Connection Failure: " . mysqli_connect_error());
}
?>