prepare('DELETE FROM attendees WHERE id = :id'); $stmt->bindParam(':id', $_POST['id'], PDO::PARAM_INT); $stmt->execute(); } catch (PDOException $e) { // In a real app, you'd log this error. // For this example, we'll just stop execution. die("Database error: " . $e->getMessage()); } } // Redirect back to the admin page header('Location: admin.php'); exit;