1

My format lets me upload an image and it automatically goes into a custom div on my page. I would like to add the source where I found that image. (to avoid issues).

<?php
        $db = mysqli_connect("localhost", "root", "****", "photos");
        $sql = "SELECT * FROM images";
        $result = mysqli_query($db, $sql);
        while ($row = mysqli_fetch_array($result)) {
            echo "<a href='uploads/".$row['image']."' data-fancybox='image'>";
                echo "<img id='img_div' src='uploads/".$row['image']."'/>";
            echo "</a>";
        }
?>

For every individual data-fancybox='image' (like once I fullscreen the image it says #image-1) I want the source right by it while the image is fullscreen. Any help is appreciated! Thank you!

0 Answers0