Everah-
Thanks for your code change, but I'm still getting the same parse error

. Due to my lack of knowledge in this area, I really have no idea how to change things or why it's doing it. I did, however, find code on what I need to do on the forum set up by the author of the php/mysql book that I have. I even tested it on my server, and all is good. However, there are a couple of problems. The data is just displayed as text (the thumbnail image's filename and the product name), but I need show the thumbnail image and its product name below the thumbnail image with each linked to the product page.
Here's what I've got so far:
http://twinpapers.com/browse_donovan_flats.php
Here's the code I used:
Code: Select all
<?php
include('header.html');
//connect to the database
include_once('connect_stflats.php');
//get the data
$query = "SELECT thumb_name, product_name FROM donovandesigs";
$result = mysql_query($query);
//set variables and constants.
DEFINE('NUM_COLUMNS', 3);
DEFINE('TABLE_WIDTH', 746);
$record_number = 0;
$column_width = floor(TABLE_WIDTH / NUM_COLUMNS);
echo '<p> </p>';
echo '<table border="0" width="'. TABLE_WIDTH . '" bgcolor=#FFFFFF align="center">';
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
if(fmod($record_number, NUM_COLUMNS) == 0)
echo '<tr>';
//--information for each individual cell in the row
echo '<td width="' . $column_width . '">';
echo '<p>' . $row[0] . ' ' . $row[1] . '</p>';
echo '</td>';
//---
$record_number++;
if(fmod($record_number, NUM_COLUMNS) == 0)
echo '</tr>';
}
echo '</table>';
include('footer.html');
?>
I know that Line 25 is what displays the data:
echo '<p>' . $row[0] . ' ' . $row[1] . '</p>';
So how do I change this so that the thumbnail image is displayed with a link (specifically
view_donovanflat.php?pid={$row['product_name']} ) and that the product name also has the same link? I've tried all kinds of possibilities, but I just keep getting a parse error. Therefore, I'm stuck at this point.
Anyone? Please!! I'm so close here. Thanks a ZILLION in advance

!!