prepare($sql); $stmt->execute($params); header('Location: admin.php'); exit; } // Fetch logic $stmt = $pdo->prepare('SELECT * FROM attendees WHERE id = ?'); $stmt->execute([$id]); $attendee = $stmt->fetch(PDO::FETCH_ASSOC); if (!$attendee) { header('Location: admin.php'); exit; } } catch (PDOException $e) { die("Database error: " . $e->getMessage()); } ?>