Hi I have the following web page:
<?
//Start session
session_start();
//Makee $backlink
$num2nextback = $num2next-20;
$num1nextback = $num1next-20;
$backlink = fullranking.".".php;
$backlink .= "?";
$backlink .= num1next;
$backlink .= "=";
$backlink .= $num1nextback;
$backlink .= "&";
$backlink .= num2next;
$backlink .= "=";
$backlink .= $num2nextback;
//Makee $forlink
$num2nextfor = $num2next+20;
$num1nextfor = $num1next+20;
$forlink = fullranking.".".php;
$forlink .= "?";
$forlink .= num1next;
$forlink .= "=";
$forlink .= $num1nextfor;
$forlink .= "&";
$forlink .= num2next;
$forlink .= "=";
$forlink .= $num2nextfor;
//Connect to database
include("connectdb.inc.php");
?>
<html>
<head>
<title>Outlink : Home</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#000000" text="#000000">
<div align="center">
<table width="699" border="0">
<tr>
<td><img src="images/title.jpg" width="700" height="100"></td>
</tr>
</table>
<table width="680" border="0">
<tr bgcolor="#333333">
<td width="50"><div align="center"><font size="-1" face="Arial, Helvetica, sans-serif"><a href="about.php">About</a></font></div></td>
<td width="65"><div align="center"><font size="-1" face="Arial, Helvetica, sans-serif"><a href="login.php">Login</a></font></div></td>
<td width="75"><div align="center"><font size="-1" face="Arial, Helvetica, sans-serif"><a href="members.php">Members</a></font></div></td>
<td width="200"><div align="center"><font size="-1" face="Arial, Helvetica, sans-serif"><a href="index.php">Home</a></font></div></td>
<td width="75"><div align="center"><font size="-1" face="Arial, Helvetica, sans-serif"><a href="faq.php">FAQ</a></font></div></td>
<td width="65"><div align="center"><font size="-1" face="Arial, Helvetica, sans-serif"><a href="signup.php"><font size="-1" face="Arial, Helvetica, sans-serif">Sign Up</font></a></div></td>
<td width="50"><div align="center"><font size="-1" face="Arial, Helvetica, sans-serif"><a href="links.php">Links</a></font></div></td>
</tr>
</table>
<table width="699" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><div align="center"><img src="images/topbar.gif" width="700" height="16"></div></td>
</tr>
<tr>
<td width="16" background="images/sidebarleft.gif"><p><br>
</p>
</td>
<td width="661" background="images/background.jpg">
<table>
<tr>
<td width=50><strong>Rank</strong></td>
<td width=150><strong>Outwar Username <br>
</strong></td>
<td width=300><strong>Outwar Link </strong></td>
<td width=75><strong>Points </strong></td>
<td width=75><strong>Clicks</strong></td>
</tr></table>
<div align="left"></div>
<hr>
<?php
//Select all the users in the database
$querytop= mysql_query( "select id, username, outwarusername, outwarlink, points, clicks from outwarinfo order by points desc limit $num1next,$num2next" );
$renum = $num1next+1;
while ( $row=mysql_fetch_array($querytop) )
{
//Ranking System
$rank = $renum++;
//Add all the results to variables for easy acccess
$outlinkid=$row[id];
$outlinkusername=$row[username];
$outwarname=$row[outwarusername];
$outwarlink=$row[outwarlink];
$outwarpoints=$row[points];
$outwarclicks=$row[clicks];
//Print the table with all the variables in it,also store information for point deducting
print "<table>";
print "<tr>";
print "<td width=50>$rank</td>";
print "<td width=150>$outwarname</td>";
print "<td width=300><a href=\"deductpoint.php?userid=$outwarname&userlink=$outwarlithusername&outlinkid=$outlinkid\" target=\"_blank\">$outwarlink</a></td>";
print "<td width=75>$outwarpoints</td>";
print "<td width=75>$outwarclicks</td>";
print "</tr>";
print "</table>";
}
//Set id to null out of the loop
$id=0;
print "<div align=center><br>";
print "<a href=\"$backlink\"><< Back</a>";
print " | ";
print "<a href=\"$forlink\">Next >></a>";
print "</div>";
?>
<table width="100%" border="0">
<tr>
<td valign="middle">Current Members:
<?php
//List amunt of members we currently have
$getmembers=mysql_query("select * from outwarinfo");
$countmembers=mysql_num_rows($getmembers);
echo ($countmembers);
?>
</td>
</tr>
</table>
<hr>
<div align="center"><a href="http://www.qksrv.net/click-1312896-5515774" target="_blank" >
<img src="http://www.qksrv.net/image-1312896-5515774" width="468" height="60" alt="" border="0"></a></div></td>
<td width="23" background="images/sidebarright.jpg"> </td>
</tr>
<tr>
<td colspan="3" background="images/background.jpg"><img src="images/bottombar.gif" width="700" height="16"></td>
</tr>
</table>
</div>
</body>
</html>
The you can probably see what I am trying to do. It all works except for when you click next. It sort of builds up. Any ideas? See the online version here:
http://outlink.coolfeepage.com
Go to the bottom of the page and select view all members and rankings.
Thanks, in advance.