Displaying MySQL database BLOB images in a table with PHP
<p>I know that I'm using depreciated MySQL, that the page will be very heavy, and I should be linking the image files into the database rather than inserting them directly there.
Besides that, I'm having trouble displaying the BLOB images from the database table "builds" in column "image".</p>

<p>Here is my code: Issues displaying opening and closing PHP tags.</p>

<p>PHPMyAdmin Picture:<img src="https://i.stack.imgur.com/tHOLT.png" alt="enter image description here"></p>

<p>Webpage Display: <img src="https://i.stack.imgur.com/y7FLY.png" alt="enter image description here"></p>

<pre><code>include ("connect.php");
$conn = mysql_connect("localhost", $id, $pw); //Start of Establishing Connection to Database "akimble"
if (!$conn) {
    die ("Error connecting: " . mysql_error()); //Displays What the Error was if Present
}
mysql_select_db($db, $conn);
$sql = "SELECT * FROM builds"; //Selects Everything From the Table "userinfo" in "akimble" Database
$results = mysql_query($sql, $conn); //Assigning all Data

echo "&lt;table cellpadding=10 border=1&gt;
&lt;tr&gt;
    &lt;th&gt;User ID&lt;/th&gt;
    &lt;th&gt;Image Name&lt;/th&gt;
    &lt;th&gt;Image&lt;/th&gt;
&lt;/tr&gt;";

while ($entries = mysql_fetch_array($results)) { //Fetch all Information within "results" Variable
    echo "&lt;tr&gt;";
        echo "&lt;td&gt;" . $entries['id'] . "&lt;/td&gt;";
        echo "&lt;td&gt;" . $entries['name'] . "&lt;/td&gt;";
        header("Content-type: image/jpg");
        echo '&lt;img src="data:image/jpg;base64,' . base64_encode( $row['image'] ) . '" /&gt;';
    echo "&lt;/tr&gt;";
                                                }
echo "&lt;/table&gt;";

mysql_close($conn);
</code></pre>

<p>Thanks for the help, I've been struggling for hours on this.</p>