Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?phP
- //koneksi database
- include "../../Config/Connection.php";
- //validasi id_akses dengan metode GET
- if(empty($_GET["id_akses"])){
- header ("location:../../index.php?page=akses¬ifikasi=id_akses_kosong");
- }else{
- //Buat variabel id_akses
- $id_akses=$_GET['id_akses'];
- //Proses Hapus dari database berdasarkan id_akses
- $HapusDataAkses= mysqli_query($conn, "DELETE FROM akses WHERE id_akses='$id_akses'") or die(mysqli_error($conn));
- //Apabila berhasil
- if($HapusDataAkses){
- header ("location:../../index.php?page=akses¬ifikasi=hapus_akses_berhasil");
- }else{
- //Apabila gagal
- header ("location:../../index.php?page=akses¬ifikasi=hapus_akses_gagal");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement