title: BLOB image not rendering
body: <p>Hi I saved a jpg image in BLOB format in mysql. I am having problem rendering the image using PHP onto my view page. When I use </p>
  
  <pre><code>header('Content-type: image/jpeg')
  </code></pre>
  
  <p>it gives a message on my page as Image cannot be displayed because it contains errors. When I print without header function is displays me some garbage text. Here is my code :</p>
  
  <pre><code>function loadImage(){
  //connect to db
  mysql_select_db('aaa',$conn);
  $query = mysql_query("SELECT * FROM asdf WHERE UserName='".$userName.");
  $row = mysql_fetch_array($query);
  $content = $row['ProfileImage'];
  header('Content-type: image/jpeg');
  echo $content;
  }
  </code></pre>
  
  <p>Here is the html code :</p>
  
  <pre><code>&lt;img src='loadImage.php?func=loadImage' /&gt;
  </code></pre>
  
  <p>If the image is displayed then I plan to use </p>
  
  <pre><code>loadImage.php?func=loadImage?id=number'
  </code></pre>
  
  <p>But image itself is not displaying. Any help greatly appreciated.</p>