Advertisement
ridyko

delete ( Data Siswa )

Feb 3rd, 2022
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. <?php
  2.  include 'koneksi.php';
  3.  
  4.  if(isset($_GET["nis"])){
  5.  // Prepared statement untuk menghapus data
  6.  $query = $db->prepare("DELETE FROM `tbl_siswa` WHERE nis=:nis");
  7.  $query->bindParam(":nis", $_GET["nis"]);
  8.  // Jalankan Perintah SQL
  9.  $query->execute();
  10.  // Alihkan ke index.php
  11.  header("location: index.php");
  12.  }
  13. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement