title: How to Displaying an image with path stored in Database?
body: <p>I have stored images path in database and images in project folder. Now i am trying to view all IMAGES with their PRODUCTS in my HTML template. I have written the following code and its given me an empty images box in the output and when i open that image box in the new tab, it opens the following URL.</p>
  
  <pre><code> http://localhost/cms/1
  </code></pre>
  
  <p>Kindly tell me the way of referring images in 'img src ' tag.</p>
  
  <p><img src="https://i.stack.imgur.com/2Mwe3.png" alt="enter image description here"></p>
  
  <pre><code>include 'connect.php';
  
  $image_query = "select * from product_images";
  $image_query_run = mysql_query($image_query);
  $image_query_fetch = mysql_fetch_array($image_query_run);
  
  
  if (!$query=mysql_query ("select product_id,name from products")) {
      echo mysql_error();
  
  } else {
      while ($query_array = mysql_fetch_array($query)) {
          echo '&lt;/br&gt;&lt;pre&gt;';
  
          $product_id = $query_array['product_id'];
  
          echo "&lt;a href='single_product.php?product_id=$product_id' &gt;";
          print_r ($query_array['name']);
          echo "&lt;/a&gt;";
  
          echo "&amp;lt;img src=". $image_query_fetch
          ['images'] ." alt=\"\" /&amp;gt;";
  
          echo '&lt;/pre&gt;';
      }
  }
  
  } else {
      echo "You need to Log in to visit this Page";
  
  }
  </code></pre>