<?php
class Database {
	public $host;
	public $dbname;
	public $username;
	public $password;
	public $db;
	public function __construct() {
		$host = $this->host = "...";
		$dbname = $this->dbname = "...";
		$username = $this->username = "...";
		$password = $this->password = "...";
		try{
		$this->db = new PDO ("mysql:host=$host;dbname=$dbname", $username, $password);
		$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
		$this->db->query('SET NAMES "utf8"');
		}
	 	catch (PDOException $e) {
			$e->getMessage();
		}
	}
}