<?php
class Database
{
     
    private $host = "localhost";
    private $db_name = "archdezc_heri";
    private $username = "archdezc_heri";
    private $password = "heri@360";
    public $conn;
     
    public function dbConnection()
	{
     
	    $this->conn = null;
	    $DB_con = null;
        try
		{
            $this->conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password);
			$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);	
			
        }
		catch(PDOException $exception)
		{
            echo "Connection error: " . $exception->getMessage();
        }
         
        return $this->conn;
    }
}

$connection = mysqli_connect('localhost', 'archdezc_heri', 'heri@360');
if (!$connection){
    die("Database Connection Failed" . mysqli_error($connection));
}
$select_db = mysqli_select_db($connection, 'archdezc_heri');
if (!$select_db){
    die("Database Selection Failed" . mysqli_error($connection));
}



$DB_host = "localhost";
$DB_user = "archdezc_heri";
$DB_pass = "heri@360";
$DB_name = "archdezc_heri";


     $host = "localhost";
    $database = "archdezc_heri";
    $username = "archdezc_heri";
    $password = "heri@360";

try
{
	$DB_con = new PDO("mysql:host={$DB_host};dbname={$DB_name}",$DB_user,$DB_pass);
	$DB_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e)
{
	echo $e->getMessage();
}