image_gallery.php
<?php
$i = 0;
//while ($data = mysql_fetch_object($result)){
for ($rows = 1; $rows<=3; $rows++){
echo "<tr>";
for ($cols=1; $cols<=4;$cols++){
if ($i >= $numRows) break;
echo '<td style="text-align:center;">';
$data = mysql_fetch_object($result);
echo '<div style="width:100px;font-family: verdana; font-size: 11px;">',$data->title;
echo '<a href="'.$data->path.'" rel="lightbox[roadtrip]">';
echo ' <span style="border:0px;"><img border="0px" class="reflect" src="'.$data->path.'" width="100" height="100" alt="'.$data->title.'" /></span>';
echo '</a></div>';
echo "</td>";
$i++;
}
echo "</tr>";
}
//}
?>
<tr>
<td colspan="4" style="text-align:center;">
<?php
if ($totalpaging > 0){
//Write first and prev navigation
if ($paging > 1){
prevpaging = 0;
echo '<a style="text-decoration:none;" href="?page=image_gallery&paging=1"><<< First</a> ';
}else{
echo "<<< First ";
}
if ($paging > 1){
$prevpaging = $paging-1;
echo '<a style="text-decoration:none;" href="?page=image_gallery&paging='.$prevpaging.'"><< Prev</a> ...';
}else{
echo "<< Prev ";
}
//write number navigation
if ($paging > 1){
$beforepaging = $paging -1 ;
echo '<a style="text-decoration:none;" href="?page=image_gallery&paging='.$beforepaging.'">'.$beforepaging.'</a> ';
}
if ($paging != 0) echo $paging;
if ($paging < $totalpaging && $paging != 0){
$nextpaging = $paging + 1 ;
echo ' <a style="text-decoration:none;" href="?page=image_gallery&paging='.$nextpaging.'">'.$nextpaging.'</a>';
}
//write next and last navigation
if ($paging < $totalpaging){
$nextpaging = $paging + 1;
echo '...<a style="text-decoration:none;" href="?page=image_gallery&paging='.$nextpaging.'">Next >></a>';
}else{
echo " Next >>";
}
$pagingDiff = $totalpaging - ($paging - 1);
if ($pagingDiff > 1){
echo ' <a style="text-decoration:none;" href="?page=image_gallery&paging='.$totalpaging.'">Last >>></a>';
}else{
echo " Last >>>";
}
}
?>
</td>
</tr>
</table>
Next paging does not work! there is no error message it's just there suppose to be too many pictures to fit in a page, I wonder why the next page does not show up, I also unable to click next!