HI,
This is the simple code that you can use for paging.
include this code on your page.
Code:
function getPageNum($tblName, $scriptName)
{
$pageNum = 0;
$pageCnt = 0;
$recNum = 10;
$query = "SELECT * FROM $tblName";
$result=mysql_query($query);
$rownum=mysql_num_rows($result);
if($rownum > 0)
{
$pageNum = ceil($rownum/$recNum);
for($i=0; $i<$pageNum; $i++)
{
$pageCnt = $i * $recNum;
if(isset($_REQUEST['pageNo']) AND $_REQUEST['pageNo']== ($i+1))
{
echo "<b>".($i+1)."</b>**";
}
else
{
echo "<a href='$scriptName?recNum=$recNum&startNum=$pageCnt &pageNo=".($i+1)."'>
-- This message may have been cut off and the rest will only be shown to members. To become a member, click here --