<?php
class Database {
    // DB Params
    private $db_name = $_SESSION['db_name'];
    echo 'con: '.$_SESSION['db_name'];
    private $conn;
    // DB Connect
    public function connect() {
      $this->conn = null;
      try { 
        $this->conn = new PDO('sqlite:' . $this->db_name);
        $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
      } catch(PDOException $e) {
        echo 'Connection Error: ' . $e->getMessage();
      }
      return $this->conn;
    }
}
?>