title: Diplaying blob image from Mysqli using PHP
body: <pre><code> $dbc=mysqli_connect('localhost','root','','db')
  
  $query="SELECT Binfile, Filetype FROM imagetable where imgid='$imgid'" ;
  $result=mysqli_query($dbc,$query);
  $row=mysqli_fetch_assoc($result);
  
  $image=$row['Binfile'];
  header("Content-type:".$row['Filetype']);
  
  echo $image;  
  </code></pre>
  
  <p>This is the code which I am using to display the image.
  But it is giving an error like</p>
  
  <p>The image <code>“http://lacalhost//viewimage.php?imgid=1”</code> cannot be displayed because it contain errors.</p>
  
  <p>Help me to remove this error and display the image…</p>
  
  <p>I wonder if I can use as <code>echo'img src='</code> type to display.</p>