<?php
include("../index.cma.db.php");
$uid1 = $_GET["uid"];
// 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 tab_personil WHERE daftar_pegid =$uid1";

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

$conn->close();
?> 