host.';dbname='.$this->db, $this->user, $this->pass); if (!$con) { die('Could not connect to database!'); } else { $this->myconn = $con; } return $this->myconn; } public function close() { $this->myconn = null; } }