I am trying to create an image gallery for use on one of my website. I have set it to display the images on a 3x3 grid. The recordset itself is made up of 30 records. Everything seems to work so far. but i am having trouble trying to create a record navigation set for it. Can anybody help me out here?
The code itself is shown below. I hope i am not breaking any rules by posting it.
If anyone can help, I will be extremely grateful.
thanks
Emmanuel
<?php require_once('../Connections/GKaosCONN.php'); ?>
<?php
// Grafik Kaos © 2002
// PHP Horizontal Looper MX
$Gallery3D_numRows = 0;
$numRowsPHPLooper = 9;
$indexPHPLooper = 0;
$totalRows_Gallery3D = $totalRows_Gallery3D + $numRows__PHPLooper;
?>
<?php
mysql_select_db($database_GKaosCONN, $GKaosCONN);
$query_Gallery3D = "SELECT * FROM gallery WHERE PicCategory = '3D Gallery'";
$Gallery3D = mysql_query($query_Gallery3D, $GKaosCONN) or die(mysql_error());
$row_Gallery3D = mysql_fetch_assoc($Gallery3D);
$totalRows_Gallery3D = mysql_num_rows($Gallery3D);
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table>
<?php
$RowStart = 0;
$RowEnd = $index__PHPLooper;
$numberColumns = 3;
$numberRows = 3;
while((($numberRows != 0) && (!($row_Gallery3D == 0))))
{
$RowStart = $RowEnd + 1;
$RowEnd = $RowEnd + $numberColumns;
?>
<tr align="center" valign="top">
<?php
while((($RowStart <= $RowEnd) && (!($row_Gallery3D == 0))))
{
?>
<td> <img src="../portfolio/thumbs/<?php echo $row_Gallery3D['PicThumb']; / PHP Advanced Dynamic Image - Grafik Kaos / ?>" alt="<?php echo $row_Gallery3D['PicName']; ?>" border="3" align="right">
</td>
<?php
$RowStart = $RowStart + 1;
$row_Gallery3D = mysql_fetch_array($Gallery3D);
}
?>
</tr>
<?php
$numberRows = $numberRows-1;
}
?>
</table>
<p> </p></body>
</html>
<?php
mysql_free_result($Gallery3D);
?>