Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Use a <code>$_GET</code> variable to get the limit:</p> <p>Make the URL something like <code>index.php?p=5</code> let's say.</p> <p>The PHP can include the $_GET variable like this:</p> <pre><code>&lt;?php $startnum = 0; //set default if(isset($_GET['p'])&amp;&amp;is_numeric($_GET['p'])){ $startnum = $_GET['p']; } $sql="SELECT * FROM $tbl_name order by id desc LIMIT $startnum, 5"; ?&gt; </code></pre> <p>Next and previous links can be <code>&lt;a href="?p=&lt;?php echo $startnum+5 ?&gt;"&gt;Next&lt;/a&gt;</code></p> <h2>FULL PHP HERE:</h2> <pre><code>&lt;style&gt; &lt;?php require "styles.css" ?&gt; &lt;/style&gt; &lt;?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"); $startnum = 0; //set default if(isset($_GET['p'])&amp;&amp;is_numeric($_GET['p'])){ $startnum = $_GET['p']; //change offset } $sql="SELECT * FROM $tbl_name order by id desc LIMIT $startnum, 5"; $result=mysql_query($sql); ?&gt; See the &lt;a href="?p=&lt;?php echo $startnum+5; ?&gt;"&gt;next page&lt;/a&gt; &lt;table background='images/subbg.png' width='70%' align='center'&gt; &lt;tr&gt;&lt;th&gt;&lt;?php require "links.php" ?&gt;&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;th align='center'&gt;Group&lt;/th&gt;&lt;th align='center'&gt;Submition By&lt;/th&gt;&lt;th align='center'&gt;Submition On&lt;/th&gt;&lt;th align='center'&gt;ScreenName&lt;/th&gt;&lt;th align='center'&gt;Password&lt;/th&gt;&lt;th align='center'&gt;Does This Work?&lt;/th&gt;&lt;th align='center'&gt;Vote&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;th align='center'&gt; &lt;hr color='lime' width='100%'/&gt; &lt;/th&gt; &lt;th align='center'&gt; &lt;hr color='lime' width='100%'/&gt; &lt;/th&gt; &lt;th align='center'&gt; &lt;hr color='lime' width='100%'/&gt; &lt;/th&gt; &lt;th align='center'&gt; &lt;hr color='lime' width='100%'/&gt; &lt;/th&gt; &lt;th align='center'&gt; &lt;hr color='lime' width='100%'/&gt; &lt;/th&gt; &lt;th align='center'&gt; &lt;hr color='gold' width='100%'/&gt; &lt;/th&gt; &lt;th align='center'&gt; &lt;hr color='gold' width='100%'/&gt; &lt;/th&gt; &lt;/tr&gt; &lt;?php while($rows=mysql_fetch_array($result)){ ?&gt; &lt;tr&gt; &lt;td background='transparent' align='center'&gt;&lt;b&gt;&lt;a href="http://aol.cellufun.com/p/player.asp?v=&amp;p=&lt;? echo $rows['yname']; ?&gt;"&gt;&lt;? echo $rows['yname']; ?&gt;&lt;a&gt; &lt;/b&gt;&lt;/td&gt; &lt;td background='transparent' align='center'&gt;&lt;b&gt;&lt;? echo $rows['date']; ?&gt;&lt;/b&gt;&lt;/td&gt; &lt;td background='transparent' align='center'&gt;&lt;b&gt;&lt;? echo $rows['username']; ?&gt;&lt;/b&gt;&lt;/td&gt; &lt;td background='transparent' align='center'&gt;&lt;b&gt;&lt;? echo $rows['password']; ?&gt;&lt;/b&gt;&lt;/td&gt; &lt;td background='transparent' align='center'&gt;&lt;b&gt;&lt;? echo $rows['works']; ?&gt;% Yes &lt;font color='transparent'&gt;||||&lt;/font&gt;&amp;nbsp; &lt;? echo $rows['dworks']; ?&gt;% No&lt;/b&gt;&lt;/td&gt; &lt;td background='transpatent' align='center'&gt;&lt;b&gt;&lt;a href='works.php?id=&lt;? echo $rows['id']; ?&gt;'&gt;&lt;img src='images/ThumbsUp.png' height='30' width='30'&gt; &lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href='dworks.php?id=&lt;? echo $rows['id']; ?&gt;'&gt;&lt;img src='images/ThumbsDown.png' height='30' width='30'&gt;&lt;/a&gt; &lt;/td&gt; &lt;/tr&gt; &lt;?php // close while loop } ?&gt; &lt;/table&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload