Next and previous links

Reply

Join Date: Jun 2004
Posts: 5
Reputation: astm is an unknown quantity at this point 
Solved Threads: 0
astm astm is offline Offline
Newbie Poster

Next and previous links

 
0
  #1
Jul 3rd, 2004
the following code read from database by limit to show 2 records

now i want to make link or button to show the next 2 records or the previons 2 records


please tell me how i can do that ??????????????? :o




the cod is

<?

$link = mysql_connect("localhost","","")
or die("error connect");

$dbrusult=mysql_db_query("mydata","select * from table LIMIT 0, 2 ");

echo ("<table border=1>");

echo ("<td align=center>NO</td>");
echo ("<td align=center>NAME</td>");
echo ("<td align=center>Country</td>");


while ($row=mysql_fetch_array($dbrusult))
{
echo "<tr>";
echo "<td align=center>$row[0]</td>";
echo "<td align=center>$row[1]</td>";
echo "<td align=center>$row[2]</td>";
echo "</tr>";
}
echo ("</table>");
mysql_free_result($dbrusult);
mysql_close($link);


?>
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 6
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: please tell me how i can do that ???????????????

 
0
  #2
Jul 7th, 2004
If you're trying to make a PHP record paging page, I suggest you look at:

http://www.daniweb.com/techtalkforums/thread1720.html
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC