I have created an image gallery using the PHP code below, which will retrieve the images from a database. Now I want to add a delete symbol to the images so that I can delete it after getting retrieved from the database. Kindly help me out. How can i do this?
<div class="header">
<h2>
GALLERY
<!--<small>All pictures taken from <a href="https://unsplash.com/" target="_blank">unsplash.com</a></small>-->
</h2>
<hr/>
<div class="body">
<div id="aniimated-thumbnials" class="list-unstyled row clearfix">
<?php
//Include database configuration file
include('dbConfig.php');
//get images from database
$query = $db->query("SELECT * FROM images ORDER BY uploaded_on DESC");
if($query->num_rows > 0){
while($row = $query->fetch_assoc()){
$imageThumbURL = 'images/thumb/'.$row["file_name"];
$imageURL = 'images/'.$row["file_name"];
?>
<a href="<?php echo $imageURL; ?>" data-fancybox="group" data-caption="<?php echo $row["title"]; ?>" >
<img src="<?php echo $imageThumbURL; ?>" alt="" />
</a>
<?php }
} ?>
</div>
</div>
</div>