Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. <?php
  2. include('koneksi.php');
  3. if(isset($_GET['nip'])){
  4.     $nip    = $_GET['nip'];
  5.  
  6.     $sql    = 'delete from datasiswa where nip="'.$nip.'"';
  7.     $query  = mysqli_query($koneksi,$sql);
  8.  
  9.     if ($query) {
  10.         echo "<script>
  11.                 alert('Data Berhasil Dihapus.');
  12.                 location.href='dsiswa.php';
  13.             </script>";
  14.     }else {
  15.         echo "alert('Data Gagal Dihapus.');
  16.                 location.href='dsiswa.php'";
  17.     }
  18.    
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement