PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Taiwo Peace   PHP Bootstrap Pagination   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example usage
Class: PHP Bootstrap Pagination
Display pagination links using Bootstrap styles
Author: By
Last change: making the example more explanatory
Date: 9 years ago
Size: 617 bytes
 

Contents

Class file image Download
<?php
//usage

//include mypagin.php;
 
require_once ('mypagin.php');

//for sql syntax to get total_record number
$sql = "SELECT COUNT(column_id) FROM tablename" ;
$total_records = $row [0];


 
 
//create a pagin class
 
$pagin=new simplepagin();
 
 
// assign variable values
 

$pagin->total_records=$total_records;
$pagin->noperpage=5;
//this would give example.php?page=1 url type
$pagin->url='example.php';
$pagin->val='page';
//pagin size (sm or lg )
//for default pagination size leave value empty like this $pagin->size=''
$pagin->size='sm';
//call the pagin function
$pagin->pagin();