delete.php

 avatar
Sndivrgwn26
php
a year ago
358 B
35
Indexable
Never
<?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';