host . ";dbname=" . $this->db_name, $this->username, $this->password, [PDO::ATTR_PERSISTENT => true] ); self::$sharedConn->exec("set names utf8"); } catch(PDOException $exception) { echo "Connection error: " . $exception->getMessage(); return null; } } $this->conn = self::$sharedConn; return self::$sharedConn; } } ?>