Ok, i got the page count.... and then divide by 30 images per page which give me the total pages.. I have no idea how to make a link to the next page and have it come back with the same variables and start displaying the next images.
$counter = 0;
while($file = readdir($dir)){
if($file != '.' && $file != '..'){
If(!is_dir($full_server.$album.$file)) {
$counter++;
}
}
}
closedir($dir);
$dir=@opendir($full_server.$album);
$pagetotal = $counter / 30;
$pagetotal = ceil($pagetotal);