Can someone please show me how to build this loop so it will show me only 5 rows at a time with the NEXT and PREVIOUS page links?
$num = mysql_numrows($result);
<? while ($i < $num) {
$picture=mysql_result($result,$i,"picture");
$row_color = ($row_count % 2) ? $color1 : $color2;
?>
<td bgcolor="<? echo "$row_color" ?>" align="center"><dd><font face="Arial, Helvetica, sans-serif"><a
href="large.php?picture=<? echo "$picture"; ?>"
onclick="NewWindow(this.href,'name','500','275','no');return false;"><img
src="/thumbnails/<? echo "$picture"; ?>+.jpg" border="1"</font>
</dd><br></td>
<?
++$i;
if ($i % 3 == 0) {
print "</tr><tr>";
$row_count++;
}
}
?>
-All the variables that seemingly are not defined, ARE defined.
I just posted the loop that generates my table.
-The "row_count" variable is for the purpose of alternating row colors... so... don't get mixed up...🙂