Paginator for my gallery
Posted: Fri Apr 02, 2010 8:18 am
Hi all! I have problem and I hope anybody can help me... I made simple php gallery, where php script take photo`s from image folder an put on site - make thumbnails and when I click, than open photo on full size. When I open my script it look like this:

But I need paginator for this script. If I press button next, or 2 than it open other 9 images... Somethink like that:

But I can`t find any tutorial, how to make paginator for my gallery
Mby somebody can help me?
php script:
Thanks!
PS. Sorry for my bad English

But I need paginator for this script. If I press button next, or 2 than it open other 9 images... Somethink like that:

But I can`t find any tutorial, how to make paginator for my gallery
php script:
Code: Select all
<?php
$dir = "images/";
if ($opendir = opendir($dir)){
$numb=0;
while (($file = readdir($opendir)) !==false){
if ($file!="."&&$file!=".."){
$numb++;
echo "<a href='$dir/$file' target='_self'><img class='photo' src='$dir/$file' width='150' height='150' border='0' /></a>";
if ($numb%3==0) echo '<br>';
if ($numb==9) break;
}
}
}
?>PS. Sorry for my bad English