<?php
include("../includes/db_connection.php");
include("../includes/auth.php");

if(!isset($_GET['id'])){
    header("Location: certificates.php");
    exit;
}

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

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

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