title: How to retrieve images from MySQL database and display in an html tag
body: <p>I created a MySQL database with a table using phpmyadmin.  I created this table with a BLOB column to hold a jpeg file.</p>
  
  <p>I have issues with regards to the php variable <code>$result</code> here.</p>
  
  <p>My code so far: (catalog.php):</p>
  
  <pre><code>&lt;body&gt;
  &lt;?php
    $link = mysql_connect("localhost", "root", "");
    mysql_select_db("dvddb");
    $sql = "SELECT dvdimage FROM dvd WHERE id=1";
    $result = mysql_query("$sql");
    mysql_close($link);
  
  ?&gt;
  &lt;img src="" width="175" height="200" /&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>How can I get the variable $result from PHP into the HTML so I can display it in the <code>&lt;img&gt;</code> tag?</p>