Hi all,
I am using PHP5, Mysql 4.1 and Apache2.
I have product-images in images folder at localhost. Product details and image names are in database e.g. in products table. I have following PHP file to display product images and their details. I can get results but without displayed images.
Images are .jpeg and .gif.
<?php
session_start();
$connect = mysql_connect("localhost", "user", "password")
or die("Hi, check your server connection.");
mysql_select_db("products");
$ImageDir = “images”;
$rows = mysql_query("select img_name, prod_name, Price
from products")
or die(mysql_error());
?>
<html>
<head>
<title>selected products</title>
</head>
<body bgcolor="#F0F0F0">
<div align="center">
<table cellpadding="5" width="80%">
<?php
While ($row = mysql_fetch_row($rows)){
extract($rows);
echo "<tr>\n
<td><br> <img src=\" . $ImageDir .$rows[0] \"></br></td>
<td><br> $row[1] </br></td>
<td><br> $row[2] </br></td>
<tr>\n";
}
?>
</table>
</div>
</body>
</html>
Any help / advice please
Thank you
MNS