<?php
class DbConfig 
{	
//mod by Didiek Suriadi
//https://tm.e/didieksuriadi
	private $_host = 'localhost';
	private $_username = 'user_database';
	private $_password = 'passworddatabase';
	private $_database = 'nama_database_ARD';
	
	protected $connection;
	
	public function __construct()
	{
		if (!isset($this->connection)) {
			
			$this->connection = new mysqli($this->_host, $this->_username, $this->_password, $this->_database);
			
			if (!$this->connection) {
				echo 'Cannot connect to database server';
				exit;
			}			
		}	
		
		return $this->connection;
	}
}
?>
