mahendradwipurwanto

CRUD 8

Feb 1st, 2018
7,039
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <?php
  2.  
  3. include 'koneksi.php';
  4.  
  5. $id_siswa       = $_GET['id_siswa'];
  6.  
  7. $hapus          = mysqli_query($conn, "DELETE FROM data_siswa WHERE id_siswa = '$id_siswa'");
  8.  
  9. if($hapus){
  10.     echo "<script>alert('Data Berhasil Dihapus');document.location.href='index.php'</script>";
  11.        
  12. }else{
  13.     echo "<script>alert('Data Gagal Dihapus');document.location.href='index.php''</script>";
  14.        
  15. }
  16.  
  17. ?>
Add Comment
Please, Sign In to add comment