Tammy Posted September 20, 2008 Share Posted September 20, 2008 I just bought this graphic generator and what this script does is when I upload graphics to my server the script generates the codes automatically so I don't have to manually code it myself, well I want to mod the code so instead of it having the 'next' and 'previous' pages I just want it to show Page numbers like '1 2 3 4 5 6' and next to it have a 'next' link and say I go to page 3 it'll still have the page numbers and a 'next' link and also a 'previous' link (the next and previous links are to go to the next page or previous page) Now this is part of the script where it shows the 'next' and 'previous' links echo '<table width="100%" border="0" cellspacing="0" cellpadding="4" border="0" bgcolor="#eeeeee" style="border-bottom: 1px solid #cccccc"><tr>'; //if ($cnt >= $start && $cnt < $end) if(isset($_GET['page'])&&($_GET['page'] != 1)) { $pre = $_GET['page'] - 1; echo '<td align="left" width="38%"><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $pre . '"><b>Previous Page</b></a></td>'; } $pages = $total/$max2show; $lastpage = ceil($pages); echo '<td></td>'; if($page < $lastpage) { $next = $page + 1; echo '<td align="right" width="45%"><a href="' . $_SERVER['PHP_SELF'] . '?page=' . $next . '"><b>Next Page</b></a></td>'; } echo '</tr> </table><br />'; Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.