Sabtu, 22 Desember 2012

Code hapus (hapus.php)

<?php
include "koneksi.php";
$nim=$_GET['nim'];
$sql="DELETE FROM mahasiswa WHERE nim='$nim'";
$qry=mysql_query($sql,$koneksi)or die ("Query Gagal".mysql_error());
if($qry){
    echo'<script type="text/javascript">alert("data sudah di hapus");</script>';
    include "tampil_mhs.php";
}
else
echo"gagal menghapus";
exit;
?>

Tidak ada komentar:

Posting Komentar