<?php
require_once 'config.php';
checkLogin();

$id = $_GET['id'] ?? null;
if ($id) {
    $stmt = $pdo->prepare("DELETE FROM contactos WHERE id = ?");
    $stmt->execute([$id]);
}

header("Location: index.php");
exit();
?>
