Sandeep Banerjee

Sandeep Banerjee

  • NA
  • 240
  • 45.9k

how to upload display image using session in php

Feb 12 2016 8:47 AM
sir how to display image using session my code is not working the database connectivity is okey its in php i don't know whats the problem here is my code.
 
login.php
 
$_SESSION["profile-pic"]=$res[17];
header("Content-type: image/jpeg");
redirect_to('profile.php');
 
and the code of user profile is:
 
<div class="follow-ava">
<img alt="picture" src="<?php echo $_SESSION['profile-pic'];?> ">
</div>
 
the output of this code is in binary image is save in database in long blob format.
 

Answers (1)