
 Radovan Janjic - 2012-10-01 15:44:38 - 
In reply to message 1 from tariqshah<?php 
$p = new pagination;
// pagination left from current
$p->paginationLeft = 4; 
// pagination right from current
$p->paginationRight = 4; 
// link href
$p->path = '?page=[pageno]';
$p->setCount(mysql_result(mysql_query("SELECT COUNT(*) FROM emails"), 0)); 
// current page
if(isset($_GET['page'])){
	$p->setStart($_GET['page']);
}
$query = mysql_query("SELECT * FROM emails ORDER BY id ASC LIMIT ".$p->getMySqlLimitStart().", ".$p->getMySqlLimitEnd());
?>
<table>
<?php
while($rec = mysql_fetch_array($query)){
	echo '<tr><td>', $rec['email'], '</td></tr>';
};
?>
</table>
<?php 
echo $p->display(); 
/*
Try this if you have more questions, please ask. ;)
 */
?>