delete.php

 avatar
Sndivrgwn26
php
2 years ago
358 B
39
Indexable
<?php

$config = mysqli_connect('localhost', 'root', '', 'eskul');

if ((!$config)) {
    # code...
    echo "error";
    die();
}

$id = $_GET['id'] ?? 0;

if ($id !== 0) {
    $query = ' DELETE FROM anggota Where no = ' . $id;
    $datas = mysqli_query($config, $query);
    header('location:index.php');
}

echo 'ida tidak boleh kosong';
Editor is loading...