title: Getting image out of database with PHP echo
body: <p>I have a database in which there is a row containing the images. Now in my code, I want to get images out of the database, but somehow I am unable to do it. Following is my code – kindly help me out –:</p>
  
  <pre><code>&lt;?php
  
  $qry = mysql_query("SELECT * FROM products ORDER BY products.id DESC LIMIT 0, 1", $con);
  if (!$qry)
  {
      die("Query Failed: ". mysql_error());
  }
  
  while ($row = mysql_fetch_array($qry))
  {
      echo "&lt;h2&gt;".$row['title']."&lt;/h2&gt;";
      echo "&lt;img src=".'Image/'.$row['image']." /&gt;";
      echo "&lt;p&gt;".substr($row['body'],0,200)."&lt;a href=articles.php?id=".$row['id']." &gt; Read more&lt;/a&gt;&lt;/p&gt;";
      echo "&lt;p&gt;".$row['price']."&lt;/p&gt;";
  }
  
  ?&gt;
  </code></pre>
  
  <p>If I don't use PHP and just use simply the <code>&lt;img&gt;</code> tag, then the path must be  <code>src="Image/passbook.jpg"</code> and it works fine but it's not working with PHP. I am creating an admin panel so that the client can delete or update the images as he want, so I must not use simple <code>&lt;img&gt;</code> tag.</p>