aeroswat Posted February 9, 2010 Share Posted February 9, 2010 This code is supposed to show links to different pages at the bottom of this like google uses to access the next pages of each search. Anywho it should show 5 on the left and 5 on the right of the current position assuming there are that many records available. If not it will cut off where it ends <DIV style="position:absolute;top:460;left:600"> <center> <?php echo ($_GET['SN']==0 ? '' : "<a href='editregistermulti-form.php?SN=" . ($_GET['SN']-1) . "'>Prev</a> "); for($i = (($_GET['SN']-5)<0 ? 0 : ($_GET['SN']-5));$i<(($_GET['SN']+5)>=count($_SESSION['MultiRegisterRes']) ? count($_SESSION['MultiRegisterRes']) : ($_GET['SN']+5));$i++) { if($i==$_GET['SN']) { echo "<span class='numbor'> " . ($i+1) . " </span> "; } else{ echo "<a href='editregistermulti-form.php?SN=" . $i . "'>" . ($i+1) . "</a> "; } } echo ($_GET['SN']==(count($_SESSION['MultiRegisterRes'])-1) ? '' : "<a href='editregistermulti-form.php?SN=" . ($_GET['SN']+1) . "'>Next</a>"); echo "<br /><br />out of " . count($_SESSION['MultiRegisterRes']) . " registrants."; ?> </center> </DIV> I run a search on my site and get 20 results. Everything works as expected until I hit search page 7 or 19. When i click that the navigation at the bottom of the page completely disappears. Link to comment https://forums.phpfreaks.com/topic/191548-very-strange-error/ Share on other sites More sharing options...
aeroswat Posted February 9, 2010 Author Share Posted February 9, 2010 Nevermind it was in a div that was being hidden when certain records came up. Nothing wrong with the code Link to comment https://forums.phpfreaks.com/topic/191548-very-strange-error/#findComment-1009725 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.