I think we were posting at roughly the same time, so you may have missed my previous post about figuring out the problem with my thumbnail links. Now I'm back to the problem of displaying the image on the product page.
Again here's the code I'm using:
Code: Select all
<?php
include('header.html');
if (isset($_GET['pid']))
{
$id = $_GET['pid'];
include_once 'connect_stflats.php';
$query = 'SELECT item_id, product_name, product_id, image_name FROM donovandesigs WHERE item_id = ' . $id;
$result = mysql_query ($query) or die('Could not execute the query: ' . mysql_error());
$row = mysql_fetch_array ($result, MYSQL_ASSOC);
if ($image = getimagesize($row['image_name']))
{
echo '<div align="center"><img src="' . $row['image_name'] . '" />';
}
else
{
echo '<div align="center">No Image Available.</div>';
}
}
include('footer.html');
?>My head is swirling with all this code, but I have no idea where to go from here.