<?php
	include 'config.php';

	session_start();

    // Start connection to database server
    $conn = @mysqli_connect($host, $dbUserName, $dbPwd);

    if (!$conn) {
        die('{"status":false, "message":"'.$lang['database-error'].' '.mysqli_connect_error().'", "error":true, "error_type":"database"}');
    }

    // make connection to database
	$db_selected = mysqli_select_db($conn, $dbName);
    if (!$db_selected) {
        die('{"status":false, "message":"'.$lang['database-denied'].' '.$dbName.' : ' . mysqli_connect_error().'", "error":true, "error_type":"database"}');
    }
    
    mysqli_set_charset($conn, 'utf8');
    //date_default_timezone_set('Asia/Kuala_Lumpur');
?>