PHP Classes

File: Example.php

Recommend this page to a friend!
  Classes of SanvidPatel  >  SPaging  >  Example.php  >  Download  
File: Example.php
Role: Example script
Content type: text/plain
Description: Example
Class: SPaging
This class can be used to display MySQL database q
Author: By
Last change:
Date: 13 years ago
Size: 1,169 bytes


Class file image Download
= 'localhost';
$dbuser = 'root';
$dbpass = '';
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');

$dbname = 'databasename';
<title>Test Paging</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css">

// This code must be put before the form tag
$Obj=new Paging("select * from tablename");
$Obj->setLimit(5);//set record limit per page
//below is optional parameter
//set link css
//End Here

<form >
<table border="1">
="select * from tablename limit $offset,$limit";
$row=mysql_fetch_array($rs)) {
// This code Must be put After the Form tag
    //get page links

For more information send a message to info at phpclasses dot org.