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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.