Hi guys...Good morning...I have following code.
<?php
$pid=$_GET['pid'];
$conn=mysql_connect('localhost','root','') or die("Cannot connect to server");
mysql_select_db('developer',$conn) or die("Cannot connect to database");
$sql="select cnode,item,pnode from listviews where cnode='$pid'";
$res=mysql_query($sql) or die("Cannot execute query");
while($ar=mysql_fetch_array($res))
{
$itm=$ar[1];
$pid=$ar[0];
}
$sql="select cnode,item,pnode from listviews where pnode='$pid'";
$res=mysql_query($sql) or die("Cannot execute query");
echo "<table border='1'>";
if($pid==0)
echo "<th colspan=2>Parent Items</th>";
else
echo "<th colspan=2>$itm</th>";
while($ar=mysql_fetch_array($res))
{
echo "<tr><td>$ar[0]</td><td>$ar[1]</td>";
}
echo "</table>";
?>
Now i want to display only five rows per page...and using next button i want to see next five records...How it is possible to display it using PHP...This page is called by ajax script...Please show me the way...Thank you...