For some reason this script won't work. It's retrieving data from a database, and it is only putting 15 results per page. If there are more than 15 entries, it adds a page number after Jump To Page so the user can go to that page.
For some reason when $pages is equal to 2, it only shows a '1' after Jump To Page. The following example is assuming that $pc is equal to 16. Here is the code:
Jump To Page: <?php echo '<a href="?page=1">1</a>'; ?>
<?php
$pages = ceil($pcount/15);
$pagenum = '1';
if($pages >= '2'){ $pagenum++; }
for( ; $pagenum >= $pages; $pagenum++) {
echo ' ยท <a href="index.php?action=viewthread&thread_id=' . $thread_id . '&board_id=' . $board_id . '&skip=' . $pagenum . '">';
echo $pagenum;
echo '</a>';
}
?>
Thanks for any help.๐