document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2.  
  3. include("config.php");
  4.  
  5. if( isset($_GET[\'id\']) ){
  6.  
  7.     // ambil id dari query string
  8.     $id = $_GET[\'id\'];
  9.  
  10.     // buat query hapus
  11.     $sql = "DELETE FROM calon_siswa WHERE id=$id";
  12.     $query = mysqli_query($db, $sql);
  13.  
  14.     // apakah query hapus berhasil?
  15.     if( $query ){
  16.         header(\'Location: list-siswa.php\');
  17.     } else {
  18.         die("gagal menghapus...");
  19.     }
  20.  
  21. } else {
  22.     die("akses dilarang...");
  23. }
  24.  
  25. ?>
');