<?php
if (!isset($GET["id"])) {
        $id = $_GET["id"];

        $servername = "localhost";
        $username = "root";
        $password = "";
        $database = "membership";

        $connection = new mysqli($servername, $username, $password, $database);

        $sql = "DELETE FROM peserta WHERE id=$id";
        $sql2 = "DELETE FROM raport WHERE id=$id";
        $connection->query($sql);
        $connection->query($sql2);
}

header("location:datapesertacch.php");
exit;
?>