Ok, here's the code. It may look involved, but all I want it to do is enter the value it gets from the database and echo it within a HTML table column <td>, then I want SQL to move down to the next row and get the next value in that row, echoing that value within the next HTML table column, but what is happenning is that the same value is echoed in all 3 columns, meaning that SQL is still reading from the same row and not descending to the next row. It seems to only move to the next row in the database when the while loop is complete <tr> - </tr>. The code within each <td> is repeative, so once you read one, the other code is the same. I hope all this makes more sense and thanks for you help.
<html>
<body>
<?
$ResultsQuery=mysql_query("SELECT * FROM PhotoTbl WHERE MainCategory='$Category' OR SubCategory1='$Category' ")
or die("DP table not functioning");
?>
<table align="center" bgcolor="#FFFFFF border="2">
<?
while ($ResultsArr=mysql_fetch_array($ResultsQuery))
{
?>
<tr>
<td>
<? // Extract out the desired fields from the database.
$ThumbFileName = $ResultsArr[Path].$ResultsArr[FileName].'.'.$ResultsArr[Type];
$EnlargeFileName = $ResultsArr[EnlargePath].$ResultsArr[FileName].'.'.$ResultsArr[Type];
?>
<a class="black" href="DP_Enlarge.php?EnlargeFileName=
<?echo $EnlargeFileName?>">
<img src="<?echo $ThumbFileName?>" border="0"><br>
<?echo $ResultsArr[WebPhotoFileName];
"</a>"
?>
</td>
<td>
<?
$ThumbFileName = $ResultsArr[Path]. $ResultsArr[FileName].'.'.$ResultsArr[Type];
$EnlargeFileName = $ResultsArr[EnlargePath].$ResultsArr[FileName].'.'.$ResultsArr[Type];
?>
<a href="DP_Enlarge.php?EnlargeFileName=
<?echo $EnlargeFileName?>">
<img src="<?echo $ThumbFileName?>" border="0"><br>
<span class="blue">
<?echo $ResultsArr[WebPhotoFileName];
"</a>"
?> </span>
</td>
<td>
<?
$ThumbFileName = $ResultsArr[Path]. $ResultsArr[FileName].'.'.$ResultsArr[Type];
$EnlargeFileName = $ResultsArr[EnlargePath].$ResultsArr[FileName].'.'.$ResultsArr[Type];
?>
<a href="DP_Enlarge.php?EnlargeFileName=
<?echo $EnlargeFileName?>">
<img src="<?echo $ThumbFileName?>" border="0"><br>
<?echo $ResultsArr[WebPhotoFileName];
"</a>";
?>
</td>
</tr>
<?
}
?>
</table>
<?
mysql_close($link);
?>
</body>
</html>