Mas Ellyx gmna bwt alert ok dan cancel untuk delete data???
Ini script delete saya...yg ini hanya ok dan keluar setlah delete dieksekusi
<?php
if (isset($_GET['nis'])) {
$nis = $_GET['nis'];
} else {
die ("Error. No nis Selected! ");
}
?>
<div id="content">
<?
//proses delete berita
if (!empty($nis) && $nis != "") {
$query = "DELETE FROM tb_kelas2a WHERE nis='$nis'";
$sql = mysql_query ($query);
if ($sql) {
echo"<script>alert('Data Berhasil Dihapus')
location.replace('admin_kelas.php?page=2a')</script>";
} else {
echo"<script>alert('Data Gagal Diedit')
location.replace('admin_kelas.php?page=2a')</script>";
}
die ("Access Denied");
}
?>
</div>
Makasih Mas Ellyx Sebelumya..