Pastinya kita sudah memiliki database dan table untuk menghapus row yang terdapat dalam table.
buat file php, dan copy paste script berikut
<a href="url/id_yg_dihapus" onClick="return konfirmasi('');"> Hapus </a>
<script type="text/javascript">
function konfirmasi(lokasi)
{
if(confirm("Anda yakin akan menghapus data ini ?")){
return true;
location.href = lokasi;
}else{
return false;
}
}
</script>
Silakan running script di atas....
No comments:
Post a Comment