Jump to content

Very strange error


aeroswat

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.