i would use mySQL's LIMIT function (if you are mySQL'ing there)
mysql_query("SELECT * FROM thumbnails LIMIT 0,12") ;
that would show 12 results from the first record in the db...
you could then have
mysql_query("SELECT * FROM thumbnails LIMIT 12,12") ;
to display the next 12
or have it as a variable to make it a lot easier
if(!isset($next))
{
$from = 0 ;
}
elseif(isset($next)) {
$from = 12 * $next ;
// for example, if $next was 3, then it would mean the 3rd set of results.. i.e. show 12 from the 36th
mysql_query("SELECT * FROM thumbnails LIMIT $from,12") ;
print "<br><br>" ;
$last = $from + 12 ;
$next_lot = $last + 1 ;
print "You are viewing results $from to $last - click <a href=\"<?=$PHP_SELF?>?next=$next_lot\">here to see the next 12</a>.";
}
or something simular...