title: How to retrieve image from database and display image on the web page
body: <p>I have inserted image into database and store name in the table.
  my image is saved in a folder named 'Uploads'.
  Now need to retrieve image from the databse and display it. when I try to display It only shows the image name which is taken from my table.but it does not show the image.</p>
  <p>retrieving code is given below</p>
  <pre><code>$sql=&quot;SELECT * FROM candi_profile WHERE can_email='{$_SESSION['usr_email']}'&quot;;
  
  $result=mysqli_query($con,$sql);
  if(!$result) die(mysqli_error($con));
    &lt;div class=&quot;container&quot;&gt;
  
          &lt;!-- Page Header --&gt;
          &lt;div class=&quot;row&quot;&gt;
              &lt;div class=&quot;col-lg-12&quot;&gt;
                  &lt;h1 class=&quot;page-header&quot;&gt;Employer Dashboard 
                     
                  &lt;/h1&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;!-- /.row --&gt;
  
          &lt;!-- Projects Row --&gt;
          
          &lt;div class=&quot;row&quot;&gt;
              &lt;div class=&quot;col-md-4&quot;&gt;
          &lt;?php
            while($rows=mysqli_fetch_array($result)){
                $c_id = $rows['can_id'];
              var_dump($c_id);
               ?&gt;
               
              &lt;p class=&quot;lead&quot;&gt;&lt;?php echo $rows['can_name'] ?&gt;&lt;/p&gt;
              &lt;div class=&quot;profile-sidebar&quot;&gt;
                  &lt;!-- SIDEBAR USERPIC --&gt;
                  
                  &lt;div class=&quot;profile-userpic&quot;&gt;
                          &lt;p class=&quot;lead&quot;&gt;
                           &lt;?php echo $rows['pic_name'] ?&gt;&lt;/p&gt;
                  &lt;/div&gt;
                  
                  &lt;!-- END SIDEBAR USERPIC --&gt;
  
                  &lt;!-- SIDEBAR USER TITLE --&gt;
                  &lt;div class=&quot;profile-usertitle&quot;&gt;
                      &lt;div class=&quot;profile-usertitle-name&quot;&gt;
                          Marcus Doe
                      &lt;/div&gt;
                      &lt;div class=&quot;profile-usertitle-job&quot;&gt;
                         &lt;?php echo $rows['can_city'] ?&gt;
                     &lt;i class=&quot;glyphicon glyphicon-map-marker&quot;&gt;
                          &lt;/i&gt;
                      &lt;/div&gt;
                          
                      &lt;div class=&quot;profile-usertitle-job&quot;&gt;
                           &lt;i class=&quot;glyphicon glyphicon-envelope&quot;&gt;&lt;/i&gt;
                        &lt;?php echo $rows['can_email'] ?&gt;
                      &lt;/div&gt;
                          
                      &lt;div class=&quot;profile-usertitle-job&quot;&gt;
                          &lt;?php echo $rows['can_country'] ?&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;!-- END SIDEBAR USER TITLE --&gt;
                  
                  &lt;!-- SIDEBAR BUTTONS --&gt;
                  &lt;div class=&quot;profile-userbuttons&quot;&gt;
                      &lt;hr&gt;
                  &lt;/div&gt;
                  
                  &lt;!-- END SIDEBAR BUTTONS --&gt;
                  &lt;!-- SIDEBAR MENU --&gt;
        
              &lt;?php
              }
              ?&gt;          
              &lt;/div&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/CjXve.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CjXve.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/CjXve.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CjXve.png" alt="enter image description here" /></a></p>