Location: PHPKode > scripts > Pagination Advanced > kbpaginationadvanced/kbpaginationadvanced/kbit.htm
<html>

<head>
<title>KBit - Knowledge Base it First | KB Pagination Advance PHP Script</title>
<style type="text/css">  
body
{ font-family: verdana, arial, sans-serif;
  padding: 0;
  margin: 5%;
}
th 
{
text-align: center; 
background: #EDF2F8;
color: #5A6370;
}
td 
{
font : 70%/1.5 Verdana, Arial, Helvetica, sans-serif;
text-align: justify;
padding: 5px;
}
table .border
{ 	
	border: solid 1px #C0C0C0;
}
</style>
</head>

<body>

<table border="0" cellpadding="10" cellspacing="10" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  <tr>
    <td width="80%" align="center">
<table class="border" cellpadding="0" cellspacing="0" width="100%">
	<tr>
        <th width="100%" height="19">KB Pagination Advance Script</th>
      </tr>
    </table>
    </td>
    </tr>
      <tr>
    <td width="80%">
<table class="border" cellpadding="0" cellspacing="0" width="100%">
	<tr>
        <th width="100%">Description</th>
      </tr>
      <tr>
        <td width="100%">
In Pagination you can distribute number of records on different pages and specify links so that user can go from one page to next page. Generally what user see is First, Previous, Next, Last links along with few page numbers like 1,2,3,4,5 and if he is on page 9 then something like 7,8,9,10,11 or 9,10,11,12,13 etc.<br><br>

But what when there are large number of pages say 1000 and a user wants to go to page number 400 then according to simple pagination he can click on Page 5 then page 7 then 9 (when there are 5 pages being shown) and page 5 then 12 then 19 (when there are 15 pages being shown) etc. and this would take time to reach Page Number 400. So, in such cases we should display more pages also.<br><br>

With this code you will be able to view more pages. Lets take an example. Say there are 10000 records and on each page 10 records are being shown. So, number of pages is 1000. Currently selected Page is 500. So, links shown will be of Page 1,2,3,497,498,499,500,501,502,503,998,999,1000 and pages between 3-497 and 503-998 range with some page number difference. Here, we have taken links to be shown = 3, that is why Page 1,2,3 are showing.<br><br>

Pagination in PHP is easy and you can show advance pagination by following code. There are 4 files (don’t go to the number of files, separate files have been created so that you can easily understand the code), I could have combined it in 1 but 4 seems to be better.<br></td>
      </tr>
    </table>
    </td>
    </tr>
      <tr>
    <td width="80%">
<table class="border" cellpadding="0" cellspacing="0" width="100%">
	<tr>
        <th width="100%">Features</th>
      </tr>
      <tr>
        <td width="100%">
<ul class="lihover">
	<li>Easy to implement script</li>
	<li>Can be easily modified</li>
	<li>Shows the Pagination by calling a function</li>
	<li>Can change number of records to be shown on a page</li>
	<li>Can change number of links to show</li>
	<li>Set Page URL</li>
  
</ul>
        </td>
      </tr>
    </table>
    </td>
    </tr>      
      <tr>
    <td width="80%">
<table class="border" cellpadding="0" cellspacing="0" width="100%">
	<tr>
        <th width="100%">Installation</th>
      </tr>
      <tr>
        <td width="100%">
        <ul>
        <li>Upload index.php, paging.php, function.php, style.css, config.php in the web directory you want to use it into</li>
        <li>Run or execute in your database SQL mode create.sql to create a table with data:
        	<ol>
        	<li>scrpagination</li>
        	</ol>
		</li>
        <li>Run index.php in your browser</li>
        </ul>
        </td>
      </tr>
    </table>
    </td>
    </tr>
      <tr>
    <td width="80%">
<table class="border" cellpadding="0" cellspacing="0" width="100%">
	<tr>
        <th width="100%">Attributes</th>
      </tr>
      <tr>
        <td width="100%">
        <b>Author</b>: KB<br>
        <b>Version</b>: 1.0<br>
        <b>$$$</b>: Free<br>        
        <b>Date</b>: 5th Feb. 2011</td>
      </tr>
    </table>
    </td>
    </tr>
      <tr>
    <td width="80%">
<table class="border" cellpadding="0" cellspacing="0" width="100%">
	<tr>
        <th width="100%">Terms of Use</th>
      </tr>
      <tr>
        <td width="100%">
<ul>

<li>You should add a link pointing to KB PHP Scripts HuB with in the page you are using this script, 
suggestions for  
        <a href='http://scripts.kunals.com/index.php?page=d/help/link' title='Link to Us'>Linking me</a></li>
<li>You cannot further distribute and gain credits for my scripts. If you are using this script 
and if any loss that may happen to any user in any way then I am not responsible 
for it in any way.</li>
</ul>
        </td>
      </tr>
    </table>
    </td>
    </tr>    
      <tr>
    <td width="80%">
	<table class="border" cellpadding="2" cellspacing="0" width="100%">
		<tr>
        <th width="100%">Help</th>
      </tr>
      <tr>
        <td width="100%">
        <b>PLEASE NOTE:</b> I cannot provide free installation support for this 
        free script! Please contact me ONLY about possible bug reports, suggestions or comments!<br>
        Check out Reviews/Comment section for this Script
		</td>
      </tr>
      <tr>
        <td width="100%">
        <p>If you use my scripts then you can put up a text or an image link of Webpany.com 
        on your website/blog/forum etc. and I will appreciate it, suggestions for  
        <a href='http://scripts.kunals.com/index.php?page=d/help/link' title='Link to Us'>Linking me</a></p>
        <p>
        You can help me by HUGging at: <a href='http://scripts.kunals.com/index.php?page=d/help/link' title='Hug Us'>
        HUG Me</a></p>
        <p>
        If you like this script then you can rate or submit reviews/comments at:<br>
        Hotscripts.com<br>
        Scripts.com<br>
        Web.kunals.com</p>
        <hr width="80%" align="center">
        </td>
      </tr>
      <tr>
        <td width="100%">
        Regards,<br>
        <b>KB kunals.com</b><br>
        <a href="http://scripts.kunals.com">http://scripts.kunals.com</a></td>
      </tr>            
    </table>            
    </td>
  </tr>
</table>

</body>

</html>
Return current item: Pagination Advanced