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

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

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