designerdrew Posted February 21, 2010 Share Posted February 21, 2010 Trying to retrieve images seperately in this oscommerce the 'configure.php' has got the setting 'define('DIR_WS_IMAGES', 'images/');' in it, but I think the php code I've setup is wrong somehow. the url is http://www.hsklettings.co.uk/catalog/mysql-retrieve.php this is the php to display images $data = mysql_query("SELECT * FROM products") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { echo "<div style='text-align:center; padding-bottom:30px; margin-left:20px;'>"; echo "<IMG SRC=". DIR_WS_IMAGES . $info['products_image'] . "<br />"; echo "Price: " . $info["products_price"] . "<br />"; echo "ID: " . $info["products_id"]; echo "</div>"; } I will post more code if needed, cheers Link to comment https://forums.phpfreaks.com/topic/192802-retrieve-image-query/ Share on other sites More sharing options...
sader Posted February 21, 2010 Share Posted February 21, 2010 maybe this will solve the problem echo "<IMG SRC=". DIR_WS_IMAGES . $info['products_image'] . "/><br />"; Link to comment https://forums.phpfreaks.com/topic/192802-retrieve-image-query/#findComment-1015610 Share on other sites More sharing options...
designerdrew Posted February 21, 2010 Author Share Posted February 21, 2010 Nearly but had to leave out the '/' echo "<IMG SRC=". DIR_WS_IMAGES . $info['products_image'] . "><br />"; Thanks Drew Link to comment https://forums.phpfreaks.com/topic/192802-retrieve-image-query/#findComment-1015752 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.