I have an image posting to the database, and comes out as binary code in the "GET" section of the comments. Basically trying to post a thumbnail with the comment. How do I get the website section to recognize the binary coding of the image, in the database, as an image when it posts to the website?
Here are my functions:
<?php
function setComments($conn) {
if (isset($_POST['commentSubmit'])) {
    $uid = $_POST['uid'];
    $date = $_POST['date'];
    $message = $_POST['message'];
    $image = $_POST['image'];
    $sql = "INSERT INTO comments (uid, date, image, message) values ('$uid', '$date','$image', '$message')";
    $result = mysqli_query($conn, $sql);
    }
}
function getComments($conn) {
    $sql = "SELECT * FROM comments ORDER BY date DESC";
    $result = mysqli_query($conn, $sql);
    while ($row = $result->fetch_assoc()){
        echo "<div class='commentbox'><p>";
            echo $row['uid'];
            echo $row['date']."<br>";
                echo "<div class='thumbnail'>";
                    echo $row['image'];
                echo "</div>";
            echo nl2br($row['message']);
        echo "<p></div>"."<br>";                    
    }
}
?>
 
    