" echo " <tr><td height='50' align='center' valign='top' bgcolor='#AAAAAA'><b>$username</b><br />$date<br />$time</td>
<td height='50' align='center' bgcolor='#AAAAAA'><b><a href='viewtopic.php?id=$id'>$topic</a></b></td></tr>";"
so the link is http://...........viewtopic.php?id=1
I am using this pagination
***** PLEASE USE PHP CODE TAG *****
Code: Select all
<?
//display data
$get = mysql_query("SELECT * FROM reply WHERE reply_id='$id' LIMIT $start, $per_page");
while ($row = mysql_fetch_assoc($get))
{
//get data
$a_username = $row['a_username'];
$a_date = $row['a_date'];
$a_time = $row['a_time'];
$a_reply = $row['a_reply'];
echo " <tr><td height='50' align='center' valign='top' bgcolor='#AAAAAA'><b>$a_username</b><br />$a_date<br />$a_time</td>
<td height='50' align='center' bgcolor='#AAAAAA'>$a_reply</td></tr>";
}
?>
</table>
<p />
<div align='center'>
<?
//setup prev and next variables
$prev = $start - $per_page;
$next = $start + $per_page;
//show prev button
if (!($start<=0))
echo "<a href='viewtopic.php?start=$prev'>Prev</a> ";
//show page numbers
//set variable for first page
$i=1;
for ($x=0;$x<$record_count;$x=$x+$per_page)
{
if ($start!=$x)
echo "<a href='viewtopic.php?start=$x'>$i</a> ";
else
echo "<a href='viewtopic.php?start=$x'><b>$i</b></a> ";
$i++;
}
//show next button
if (!($start>=$record_count - $per_page))
echo " <a href='viewtopic.php?start=$next'>Next</a>";
?>then click it again http://...........viewtopic.php?id=1?start=2?start=2 and adds that every time I click it
can anyone help its the last part of making my forum, please?