jcbarr Posted April 14, 2006 Share Posted April 14, 2006 Okay here is my code[code]<? include("header.php") ?><div class="two" id="news" style="position: absolute; left: 290px; top: 315px; height: 538px; width: 500px; padding: 1.5em;"><? include("db.php") ?><?$id=$_GET['id']; if (!isset($id)){ ?><table border=0 align=left><?$sql="SELECT * FROM promos ORDER BY id DESC";$query=mysql_query($sql);while ($p=mysql_fetch_array($query)) {echo "<tr><td class=one valign=top>";echo "<img src=images/rp/";echo $p['username'];echo ".jpg align=left>";echo "<a class=one href=promos.php?id=";echo $p['id'];echo "> ";echo $p['title'];echo "</a><br>";echo " Promo #";echo $p['id'];echo "<br>";echo " By: ";echo $p['author'];echo "</td></tr>"; }?></table><? } ?>[/code]My question is, is there any simple way to paginate this sort of output? Like show 20 entries on one page, and have a link to the next page to show the next 20 and so on?I have seen a few posts on this, but I am still having problems figure this one out.Thanks in advance for the help. Quote Link to comment Share on other sites More sharing options...
litebearer Posted April 14, 2006 Share Posted April 14, 2006 There is a tutorial for that here on PHPFreaks[a href=\"http://www.phpfreaks.com/tutorials/73/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/73/0.php[/a]Lite... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.