<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Prevent Browser Cache
header("Expires: Tue, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

// upload.php
$servername = "localhost";
$username = "root";
$password = "ServBay.dev";
$dbname = "mcc-dnc";
$path = "https://mcc-forms.dev/mini-dnc/";

if ($_SERVER['HTTP_HOST'] == "dnc.mastercontactcentre.com") {
    $servername = "localhost";
    $username = "dncmastercontact_minidnc";
    $password = "dncmastercontact_minidnc";
    $dbname = "dncmastercontact_minidnc";
    $path = "https://dnc.mastercontactcentre.com/mini/";
}

$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
    die("Database connection failed: " . $conn->connect_error);
}