<?php
include("../index.cma.db.php");
$id1 = $_GET["id"];
// Create connection
$conn = new mysqli($server, $username, $password, $database);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// sql to delete a record
$sql = "DELETE FROM pengumuman WHERE i_id =$id1";

if ($conn->query($sql) === TRUE) {
    echo "<a href=\"index.php?g=beranda&i=index\" class=\"menu\">BERHASIL MENGHAPUS  KLIK UNTUK KEMBALI</a>";
} else {
    echo "Error deleting record: " . $conn->error;
}

$conn->close();
?> 