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

include 'koneksi.php';

$id = (int)$_GET['id'];

$stmt = $conn->prepare("DELETE FROM artikel WHERE id=?");
$stmt->bind_param("i", $id);
$stmt->execute();

header("Location: artikel.php");
exit;
