hey lads, i got this technique and is working like a charm on my website..
you guys can also follow this technique
here is a snippet..
Code:
if(!isset($start))
{
$start=0;
}
$eu=$start-0;
$limit=2;
$this1=$eu + $limit;
$back=$eu - $limit;
$next=$eu + $limit;
$sql="Select * from db_posts";
$result=mysql_query($sql);
$number=mysql_num_rows($result);
$query="select * from db_posts order by id desc limit $eu,$limit";
$res=mysql_query($query);
while($result=mysql_fetch_array($res))
{
echo "".$result['ptitle']."";
echo "<font size=2>,by ".$result['uname']."</font>
";
echo $result['pcontent']."
<hr>";
}
if($back >=0)
{
print "<font face='Verdana' size='2'>PREV</font>";
}
$i=0;
$lil=1;
for($i=0;$i < $number;$i=$i+$limit)
{
if($i != $eu)
{
echo " <font face='Verdana' size='2'>$lil</font> ";
}
else
{
echo "<font face='Verdana' size='4' color=red>$lil</font>";
}
$lil=$lil+1;
}
if($this1<$number)
{
echo "NEXT";
}
else
{
echo"<font color=gray> No More Pages</font>";
}
I am a new coder so you guys can very well judge mistakes, if any
thanks for ur consideration