<?php
  require_once '../system/conn.php';

$delete=$conn->prepare("DELETE FROM `candidate_details` WHERE `id`=?");
$yes = $delete->execute([$_GET['id']]);
if($yes){
    echo "<script>alert('Candidate removed successfully...')</script>";
    echo "<script>window.location.assign('all-candidates.php')</script>";
} else {
    echo "<script>alert('Something went wrong!!!')</script>";
}
?>