<LINK href="images/index.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
    function refreshAndClose() {
        window.opener.location.reload(true);
        window.close();
    }
</script>
<body onbeforeunload="refreshAndClose();"><?php
//mysql_connect("localhost","root","benk")or die(mysql_error());
//mysql_select_db("cma_tilang") or die(mysql_error());
$uid1 = $_GET["id"];
// Create connection
$conn = new mysqli("localhost","root","benk", "cma_tilang");
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// sql to delete a record
$sql = "DELETE FROM t_tilang WHERE t_id =$uid1";

if ($conn->query($sql) === TRUE) {
    echo "BERHASIL MENGHAPUS TUTUP JENDELA INI";
} else {
    echo "Error deleting record: " . $conn->error;
}

$conn->close();
?> 