<?php
require 'functions/functions.php';
$var = $_GET['id'];
$query = "DELETE FROM `$dbname`.`target` WHERE `target`.`id` = '$var' LIMIT 1";

mysqli_query($conection, $query) or die(mysqli_error());
?>

<script>
location.href='target.php';
</script>