How can I paginate this script to show 5 rows on one page and 5 on another and so on. I have no clue how to do it. I have tried tutorials and more for this but still cant get it. Please some one help me. Following is my code : \[code\]<?php require "manybr.htm" ?><style><?php require "styles.css" ?></style><?php$host="XXXXX"; // Host name $username="XXXX"; // Mysql username $password="XXXXX"; // Mysql password $db_name="XXXX"; // Database name $tbl_name="tylted"; // Table name // Connect to server and select database.mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB");// select record from mysql $sql="SELECT * FROM $tbl_name order by id desc";$result=mysql_query($sql);?><table background='images/view.png' width='50%' align='center'><tr><th align='center'>Group</th><th align='center'>Submition By</th><th align='center'>Submition On</th><th align='center'>ScreenName</th><th align='center'>Password</th><th align='center'>Does This Work?</th><th align='center'>Vote</th></tr><tr><th align='center'><hr color='lime' width='100%'/></th><th align='center'><hr color='lime' width='100%'/></th><th align='center'><hr color='lime' width='100%'/></th><th align='center'><hr color='lime' width='100%'/></th><th align='center'><hr color='lime' width='100%'/></th><th align='center'><hr color='gold' width='100%'/></th><th align='center'><hr color='gold' width='100%'/></th></tr><?phpwhile($rows=mysql_fetch_array($result)){?><tr><td background='transparent' align='center'><b><a href="http://aol.cellufun.com/p/grp/grp.asp?v=??&grp=<? echo $rows['group']; ?>">{<? echo $rows ['group']; ?>}</a> </b></td><td background='transparent' align='center'><b><a href="http://aol.cellufun.com/p/player.asp?v=&p=<? echo $rows['yname']; ?>"><? echo $rows['yname']; ?><a> </b></td><td background='transparent' align='center'><b><? echo $rows['date']; ?></b></td><td background='transparent' align='center'><b><? echo $rows['username']; ?></b></td><td background='transparent' align='center'><b><? echo $rows['password']; ?></b></td><td background='transparent' align='center'><b><? echo $rows['works']; ?>% Yes <font color='transparent'>||||</font> <? echo $rows['dworks']; ?>% No</b></td><td background='transpatent' align='center'><b><a href='http://stackoverflow.com/questions/14064713/works.php?id=<? echo $rows['id']; ?>'><img src='http://stackoverflow.com/questions/14064713/images/ThumbsUp.png' height='30' width='30'></a> <a href='http://stackoverflow.com/questions/14064713/dworks.php?id=<? echo $rows['id']; ?>'><img src='http://stackoverflow.com/questions/14064713/images/ThumbsDown.png' height='30' width='30'></a></td> </tr><?php// close while loop }?><?php// close connection; mysql_close();?></table>\[/code\]i have added LIMIT 0 , 5 to my query and now 5 show up now how do i do the part with links to page 2I don't know \[code\]MySqli\[/code\] ,\[code\]PDO\[/code\] yet. I will learn soon so please don't make that comment.. I will move my inline code into \[code\]css\[/code\] soon but not yet i need to get this working first..