title: show image from blob mysql
body: <p>Hi I have a image table in my database. These are stored as blob along with details such as image type &amp; name.</p>
  
  <p>I am having a problem showing the image, all I get is a white box with a red cross in it.
  code:</p>
  
  <pre><code>&lt;?php
  
  include '../connection.php';
  
  $ID = $_GET['id'];
  
  $query = "SELECT * FROM `images` WHERE `image_id` = '$ID'";
  
  $result=mysql_query($query);
  $row = mysql_fetch_array($result);
  
  $image = $row['image'];
  $image_type= $row['image_type'];   
  
  header("Content-type: $image_type");
  print $image; 
  
  exit;
  
  ?&gt;
  </code></pre>
  
  <p>Thanks</p>