<?php 
    //setup database access
    require_once($_SERVER['DOCUMENT_ROOT'] . '/config/dbaccess.php');
    $db = new mysqli($host, $user, $pass, $dbname);
    if ($db->connect_errno) {
        echo "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error;
    }
    
?>