<?php
session_start();
include('config.php');
if (!isset($_SESSION['admin_logged_in'])) {
    header("Location: login.php");
    exit;
}

$id = $_GET['id'] ?? null;
if ($id) {
    $stmt = $dbh->prepare("DELETE FROM blackbrokers WHERE id = ?");
    $stmt->execute([$id]);
}
header("Location: list_blackbrokers.php?deleted=1");
exit;
