I want to display profile image for each account as the user loggs into their profile.Similar to the social website profile image.
I've managed to store the images into the database using php.
Problem is i cant display images at all.the rest of the data display fine.
I have the following code which cant work:
- main profile page has the following script:
<?php echo '<img src="XXXXX_XXX.php?id=$Current_Person_Id">';
2.the image page has the following script:
$result = mysqli_query($link,"select from *** where Person_Id=$Current_Person_Id ");
////starting the inner validation
//else if($result){
while($row = mysqli_fetch_array($result))
{
//$row_color = ($row_count % 2) ? $color1 : $color2;
$content=$row['Photo_Content'];
$name=$row['Photo_Name'];
$type=$row['Photo_Type'];
$size=$row['Photo_Size'];
$row_count++;
}
header("Content-length: $size");
header("Content-type: $type");
header("Content-Disposition: attachment; filename=$name");
echo $content; }