<?php
require_once 'includes/db.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['member_id'])) {
    $member_id = (int)$_POST['member_id'];
    $stmt = $conn->prepare("UPDATE members SET banned = 1 WHERE id = ?");
    $stmt->bind_param("i", $member_id);
    $stmt->execute();
    header("Location: banned_members.php");
    exit;
}
?>
