I have started the code, but here's what I'd like to do, I'd like to have the page show one image at a time with a navigation bar below with links to click from image to image... Here's what I've got so far.
What I can't figure out is how to get it to show the image for the associated row number in the array. I know that this shouldn't be so difficult! I think once I get that, I can sort through creating the navigation bar.
Code: Select all
<?php
include ('connection/db.php');
$collection = $_GET['collection'];
$category = $_GET['category'];
$query = ("SELECT * FROM collection_tb WHERE collection = '$collection' AND piecetype = '$category'");
$result = mysql_query ($query);
$row = mysql_fetch_array ($result);
$numRows = mysql_num_rows ($result);
?>
<table style="height:400px;" align="center" width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20px"></td>
</tr>
<tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<?php
$rowNum = 0;
if ($rowNum <= $numRows)
{
?>
<td align="center"><img src="<?php echo $row['imageLinkMd'];?>" /></td>
<td><?php echo $row['piecenum'];?></td>
<?php
$rowNum ++;
echo $rowNum;
}
?>
</tr>
</table>
</td>
</tr>
</table>