title: Printing an image php
body: <p>I want to print an image in a php file using the  tag, the absolute path of the said image is stocked in myphp data base as follows C:\xampp\htdocs\project\Attempt\assets\img\img.jpg.
  I tried the following method but to no avail.</p>
  <pre><code>$pdo =new PDO(&quot;mysql:host=localhost;dbname=login&quot;,&quot;root&quot;,&quot;&quot;);
          $stm = $pdo-&gt;prepare(&quot;select * from category&quot;);
          $stm -&gt; execute();
          $tab = $stm-&gt;fetchAll();
          foreach($tab as $p)
          {
              echo $p[&quot;CATEGORY_ID&quot;].'&lt;br&gt;';
              echo $p[&quot;NAME&quot;].'&lt;br&gt;';
              echo '&lt;img src='.$p[&quot;IMAGE&quot;].'&gt;&lt;/img&gt;&lt;br&gt;';
              echo $p[&quot;COVER&quot;].'&lt;br&gt;';
              echo $p[&quot;DESCRIPTION&quot;];
          };
  
  </code></pre>
  <p>thanks</p>