943,636 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 3782
  • PHP RSS
Jul 3rd, 2004
0

Next and previous links

Expand Post »
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);


?>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
astm is offline Offline
5 posts
since Jun 2004
Jul 7th, 2004
0

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

If you're trying to make a PHP record paging page, I suggest you look at:

http://www.daniweb.com/techtalkforums/thread1720.html
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Problems with session_unregister and / or unset()
Next Thread in PHP Forum Timeline: php project





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC