title: I want to display an image instead of downloading it (Image in database blob)
body: <p>I want display an image instead of downloading it.</p>
  
  <p>I have image in my database table, column as BLOB.</p>
  
  <p>This snippet downloads the image, but I want to display it instead:</p>
  
  <pre><code>$query = "SELECT * FROM upload";
  $result  = mysql_query($query);
  $row = mysql_fetch_array($result);
  $content =  $row['content'];
  $size =  $row['size'];
  $type =  $row['type'];
  header("Content-length: $size");
  header("Content-type: $type");
  
  // The following headers make the image download, but I don't want it to
  // download, I want to show the image. What should I do?
  // header("Content-Disposition: attachment; filename=$name");
  
  echo $content;
  </code></pre>