  
<?php
//prod
// define('DBINFO', 'mysql:host=localhost;dbname=jofajdnn_jofayedb');
// define('DBUSER', 'jofajdnn_judeok');
// define('DBPASS', 'jofayeBoss123');

//dev
define('DBINFO', 'mysql:host=localhost;dbname=stjudewellness');
define('DBUSER', 'root');
define('DBPASS', 'justus$$');
//crud add, delete, edit
$options = [];

try {
    $connection = new PDO(DBINFO, DBUSER, DBPASS, $options);
} catch (PDOException $e) {
}


function DbHandler()
{
    $dbHost = 'localhost';
    $dbName = 'stjudewellness';
    $dbUser = 'root';
    $dbPass = 'justus$$';
    //Create a DSN for the database resource...
    $Dsn = "mysql:host=" . $dbHost . ";dbname=" . $dbName;
    //Create an options configuration for the PDO connection...
    $options = array(
        PDO::ATTR_PERSISTENT => true,
        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
    );

    try {
        $Connection = new PDO($Dsn, $dbUser, $dbPass, $options);
        return $Connection;
    } catch (Exception $e) {
        var_dump('Couldn\'t Establish A Database Connection. Due to the following reason: ' . $e->getMessage());
    }
}

?>
