prepare("SELECT * FROM schemes WHERE id = ?"); $stmt->execute([$scheme_id]); $scheme = $stmt->fetch(PDO::FETCH_ASSOC); } catch (PDOException $e) { // For development: error_log($e->getMessage()); // For production, show a generic error and log the details. die("Error: Could not connect to the database."); } if (!$scheme) { // Redirect if scheme not found header("Location: index.php"); exit(); } ?>