<?php
include '../../db_connect.php';

$id = $_GET['id'];
$sql = "SELECT * FROM newsletters WHERE id = $id";
$result = $conn->query($sql);
$subscription = $result->fetch_assoc();
?>

<?php
include "../layout/header.php";
?>
        <h2 class="text-center">Newsletter Subscription Details</h2>
        <div class="card">
            <div class="card-body">
                <h5 class="card-title"><?= $subscription['email'] ?></h5>
                <a href="index.php" class="btn btn-primary">Back to List</a>
            </div>
        </div>
    </div>
</body>
</html>

<?php $conn->close(); ?>
