Jump to content

[SOLVED] display images from a databse?


andrew_biggart

Recommended Posts

Im trying to display profile pictures of each user from a database but the picture does not load up, when the page loads the td that holds the image goes to 100px x 100px but then back down to 0 again so its like its trying to display it and cant find it.

 

Is this the correct way to display an image from a database?

 

<? echo "<img src='Profile_pics/". $rows['Profile_picture'] . "' style='width:100px; height:100px;' />";?>

 

the row the image names are held in the database is definitly called, Profile_picture and the folder where the images are held is called Profile_pics so i really dont know!!

 

any ideas?

Link to comment
https://forums.phpfreaks.com/topic/147441-solved-display-images-from-a-databse/
Share on other sites

I have built queries the same way, except swapping the ' and " about.

 

echo '<img src="'.$searchcem.'/'.$imageid.'.JPG" height="100" width="100">';

 

If that does not help (I have always used " in html tags like this) then double check capatilisation of directories & filenames

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.