PHP comment box with image
<p>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?</p>

<p>Here are my functions:</p>

<pre><code>&lt;?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-&gt;fetch_assoc()){
        echo "&lt;div class='commentbox'&gt;&lt;p&gt;";
            echo $row['uid'];
            echo $row['date']."&lt;br&gt;";
                echo "&lt;div class='thumbnail'&gt;";
                    echo $row['image'];
                echo "&lt;/div&gt;";
            echo nl2br($row['message']);
        echo "&lt;p&gt;&lt;/div&gt;"."&lt;br&gt;";                    
    }

}
?&gt;
</code></pre>