almightyegg Posted June 24, 2007 Share Posted June 24, 2007 I have a message board page that displays one page of one forums' messages using pagination. It all works really well unless there are no messages in which case nothing below the bit in the pagination code that echoes 'first prev [1] [2] ... next last' is shown. Below this section I have the form to add a thread and some links, but they aren't shown because of this problem in the script. This means that the first message in each forum can only be put in from PhpMyAdmin or by a script I make specifically for it. <? echo "<center>"; if($page > 1){ $prev = ($page - 1); echo "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=1'>First</a> "; echo "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=$prev'>Prev</a> "; } for($i = ($page - 2); $i <= ($page + 2); $i++){ if (($i >= 1) && ($i <= $total_pages)) { echo ($page == $i) ? "[$i] " : "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=$i'>$i</a> "; } } if($page < $total_pages){ $next = ($page + 1); echo "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=$next'>Next</a> "; echo "<a href='{$_SERVER['PHP_SELF']}?f=$f&page=$total_pages'>Last</a>"; } echo "</center>"; ?> Nothing below that is shown and it echoes no errors... Link to comment https://forums.phpfreaks.com/topic/56990-parts-of-page-disappearing/ Share on other sites More sharing options...
almightyegg Posted June 27, 2007 Author Share Posted June 27, 2007 Any ideas??? ??? Link to comment https://forums.phpfreaks.com/topic/56990-parts-of-page-disappearing/#findComment-283871 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.