Jump to content

Retrieve image query


designerdrew

Recommended Posts

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

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.