1. Pagination in PHP
First of all we create a table in the database. Suppose we have ’user’ table in the
database. Like as following image.
Now we create database connectivity in the confg.php file.
Config.php
<?php
$dbhost= "localhost";
$dbuser= "root";
$dbpass= "";
$dbname= "pagination3";
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ("Error connecting to
database");
mysql_select_db($dbname);
?>
Index.php
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Pagination in PHP</title>
<style>
.paginate {
font-family:Arial, Helvetica, sans-serif;
padding: 3px;
margin: 3px;
}
.paginate a {
padding:2px 5px 2px 5px;
margin:2px;
www.vineetsaini.wordpress.com