title: how to display blob as image in php
body: <p>Hi I'm storing an image as <code>blob</code> in a SQL database and I want to display it
  but when I do it´s a blank image. I'm saving like this:</p>
  
  <pre><code>$image = addslashes(file_get_contents($_FILES['image']['tmp_name']));
  $image = base64_encode($image);
  
  $sql = "INSERT INTO `imagenes` (`imagen`,)  VALUES ('$image',)";
  </code></pre>
  
  <p>and when I display it I use an <code>echo</code> with:</p>
  
  <pre><code>img src="data:image/jpg;base64,'.$row["image"].'"
  </code></pre>
  
  <p>It shows a blank image, so I don´t know what I'm doing wrong.</p>