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

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

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