fireice87 Posted April 11, 2008 Share Posted April 11, 2008 Hey Im trying to pull an image path out of my database and use it with 'img src' to display an image. The data is coming from the database because all the other data is displaying fine have triple checked for typos and tried lots of varations on img src='".$image."' , img src='$image' , ".$image." .etc heres the code in question: echo "<td width=\"160\" height=\"150\" rowspan=\"5\" > <img src='".$image."' alt=\"Image Unavailable\" /> </td>"; The alt message does show Thanks for any help Edit: also have tested by typing <img src=\"Images/imagename.gif\" to make sure the file path from the database is correct Link to comment https://forums.phpfreaks.com/topic/100698-image-not-showing/ Share on other sites More sharing options...
Zhadus Posted April 11, 2008 Share Posted April 11, 2008 Try setting it up this way. <img src='.$image.' And if that does not work, have it echo out $image just to see that exact value that it's providing. Link to comment https://forums.phpfreaks.com/topic/100698-image-not-showing/#findComment-514999 Share on other sites More sharing options...
craygo Posted April 11, 2008 Share Posted April 11, 2008 did you save the path with the image?? if not you will have to put the path in also <img src=\"Images/".$image."\" border=\"0\" /> After you load the page, right click on it and select view source code to see where it is going. Ray Link to comment https://forums.phpfreaks.com/topic/100698-image-not-showing/#findComment-515002 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.