Jump to content

Getting image to display properly


natasha23

Recommended Posts

Hi I need some help getting the image to display.

 

I have saved the image in a file and have put the path for the image into the database.

 

This is the code i have for displaying my image, at the moment it displays a broken white box in the place where the image should be.

 

$Picture = $Row['Picture'];

echo '<p align="right">'.("<img src=$Picture width='130'/>" );   

   

Can anyone help please???

 

 

Link to comment
https://forums.phpfreaks.com/topic/193705-getting-image-to-display-properly/
Share on other sites

Could be or or two things. You said you have the path in a db. Img uses a url.

also

echo '<p align="right">'.("<img src=$Picture width='130'/>" );

the src needs to be contained

echo "<p align='right'><img src=\"$Picture\" width='130'/>";

 

 

HTH

Teamatomic

Ok the src of the <img can be a full url, or a relative filesytem path, but you have not shown what is appearing in your $Picture variable.

 

can you either view source and post what you see in the src= or echo $Picture and see what you have.

 

 

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.