class Database { private $host = "localhost"; private $db_name = "gainza_guardias_db"; private $username = "gainza_devopBCF"; // ← reemplaza por tu usuario real private $password = "dev18BCF0U_mr"; // ← reemplaza por tu contraseña real public $conn; public function connect() { $this->conn = null; try { $this->conn = new PDO( "mysql:host={$this->host};dbname={$this->db_name}", $this->username, $this->password ); $this->conn->exec("set names utf8"); } catch(PDOException $e) { die("Database connection error: " . $e->getMessage()); } return $this->conn; } }