SHARE
TWEET

Untitled

a guest Oct 13th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. include('config.php');
  3. if(isset($_GET['id'])){
  4.     $id = $_GET['id'];
  5.     $cek = mysqli_query($koneksi, "SELECT * FROM WebPrograming2 WHERE id='$id'") or die(mysqli_error($koneksi));
  6.     if (mysqli_num_rows($cek) > 0) {
  7.         $del = mysqli_query($koneksi, "DELETE FROM WebPrograming2 WHERE id='$id'") or die(mysqli_error($koneksi));
  8.         if($del){
  9.             echo '<script>alert("Berhasil menghapus data."); document.location="index.php";</script>';
  10.         }else {
  11.             echo '<script>alert("Gagal menghapus data."); document.location="index.php";</script>';
  12.         }
  13.     }else {
  14.         echo '<script>alert("ID tidak ditemukan di database."); document.location="index.php";</script>';    
  15.     }
  16. }else {
  17.     echo '<script>alert("ID tidak ditemukan di database."); document.location="index.php";</script>';
  18. }
  19. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top