PHP Classes

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Harish Chauhan  >  Paging Easy  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example File
Class: Paging Easy
Generate links to navigate on query result pages
Author: By
Last change: Example File
Date: 10 years ago
Size: 1,436 bytes


Class file image Download


$con=mysql_connect('localhost','root','') or die('could not open mySql Connection!');

mysql_select_db("mydb") or die('Unable to open database');

$sql="SELECT username FROM member";



$page=new Page(); ///creating new instance of Class Page

/* if there is any query string you want to pass with links just use*/
    // $page->set_qry_string(name=harish&id=7347);

    // If you want to pass any parameters to page links such that stylesheet or style sheet class

    // $page->set_link_parameter("Class = myStyleSheetClass") OR
    // $page->set_link_parameter("Style='color:#FF0000;'")

"User : ".$row['username']."<br>";

      if you want to use images as next previous etc. links then use like
      $page->get_first_page_nav("<img src='imgSource' alt='first'>");
      $page->get_prev_page_nav("<img src='imgSource' alt='next'>");
      $page->get_next_page_nav("<img src='imgSource' alt='prev'>");
      $page->get_last_page_nav("<img src='imgSource' alt='Last'>");