Guest User

data_del.php

a guest
Mar 29th, 2017
8,849
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2. //HAPUS
  3. include "koneksi.php";
  4. $id     = $_GET['id'];
  5. $result = mysqli_query($koneksi, "DELETE FROM m_siswa WHERE id = '$id'");
  6. if ($result){ ?>
  7.     <script language="javascript">
  8.             alert('Berhasil Dihapus');
  9.         document.location.href="index.php";
  10.     </script>
  11. <?php
  12. }else {
  13.         trigger_error('Perintah SQL Salah: ' . $sql . ' Error: ' . $koneksi->error, E_USER_ERROR);
  14. }
  15. ?>
Add Comment
Please, Sign In to add comment