natasha23 Posted February 28, 2010 Share Posted February 28, 2010 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 More sharing options...
teamatomic Posted February 28, 2010 Share Posted February 28, 2010 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 Link to comment https://forums.phpfreaks.com/topic/193705-getting-image-to-display-properly/#findComment-1019573 Share on other sites More sharing options...
jl5501 Posted February 28, 2010 Share Posted February 28, 2010 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. Link to comment https://forums.phpfreaks.com/topic/193705-getting-image-to-display-properly/#findComment-1019577 Share on other sites More sharing options...
natasha23 Posted February 28, 2010 Author Share Posted February 28, 2010 Thank you! containing the src worked. Link to comment https://forums.phpfreaks.com/topic/193705-getting-image-to-display-properly/#findComment-1019602 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.