safeLoad(); } Class Dropdown { private $host; private $username; private $password; private $dbname; private $connection; //establish connection public function __construct() { $this->host = $_ENV['DB_HOST'] ?? 'localhost'; $this->username = $_ENV['DB_USERNAME'] ?? ''; $this->password = $_ENV['DB_PASSWORD'] ?? ''; $this->dbname = $_ENV['DB_DATABASE'] ?? ''; try { $this->connection = new mysqli($this->host, $this->username, $this->password, $this->dbname); } catch (Exception $e) { echo "Connection error " . $e->getMessage(); } }