Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("config.php");
- if( isset($_GET['id']) ){
- // ambil id dari query string
- $id = $_GET['id'];
- // buat query hapus
- $sql = "DELETE FROM calon_siswa WHERE id=$id";
- $query = mysqli_query($db, $sql);
- // apakah query hapus berhasil?
- if( $query ){
- header('Location: list-siswa.php');
- } else {
- die("gagal menghapus...");
- }
- } else {
- die("akses dilarang...");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement