i cannot seem to create a delete button to delete specific items from my database. i have create a database to store images in images table:
the images will appear in my shop.php and from there, i want to create a delete button where i can delete the images from the database.
snippet of my shop.php:
<?php
while ($row = mysqli_fetch_array($result))
{
    echo "<div class='col-sm-4'>";
    echo "<div class='product-image-wrapper'>";
    echo "<div class='single-products'>";
    echo "<div class='productinfo text-center'>";
    echo "<div id='img_div'>";
    echo "<img height='250' src='images/".$row['image']."' >";
    echo " <h2>$56</h2>";
    echo "<p>".$row['image_text']."</p>";
    echo "</div>";
    echo "<div class='choose'>";
    echo  "<ul class='nav nav-pills nav-justified'>";
    echo  "<li><a href=''><i class='fa fa-plus-square'></i>Add to wishlist</a></li>";
    //echo  "<li><a href=''><i class='fa fa-times'></i>Delete</a></li>";
    echo "<li><a href='delete.php?id=" . $row['id'] . "'><i class='fa fa-times'></i>Delete</a></li>";
    echo  "</ul>";
    echo  "</div>";
    echo "</div>";
    echo "</div>";
    echo "</div>";
    echo "</div>";
}
?>
and here is my delete.php:
<?php
if (is_int($_GET["id"]) {
    $query = "DELETE FROM images WHERE id = " . $_GET["id"];
    $result = mysqli_query($con, $query);
    // Check the result and post confirm message
}
?>

 
    