quickbird 0 Newbie Poster

I have this code in which i want to paginate only the $getreplies section in the code.Please help me i have tried various ways but they didn't work.here is my code....

<?php 

include "connect.php"; //mysql db connection here

$id=$_GET['id'];

print "<link rel='stylesheet' href='style.css' type='text/css'>";?>
<div align="center">
<?php
print "</div><img src=\"mylogo.jpg\" width=\"280\" height=\"130\"/><img src=\"allah.gif\" align=\"right\" height=\"125\" width=\"125\"/><img src=\"muhammad12.jpg\" align=\"right\" width=\"60\" height=\"60\"/><br>";
include "connect.php"; 
print "<A href='introductionreply.php?id=$id'><img src=\"reply.gif\"</a><br>";

print "<table class='maintable'>";

print "<tr class='headline'><td width=20%>Author</td><td width=80%>Post</td></tr>";

$gettopic="SELECT * from introduction_posts where postid='$id'";

$gettopic2=mysql_query($gettopic) or die("Could not get topic");

$gettopic3=mysql_fetch_array($gettopic2);

print "<tr class='mainrow'><td valign='top'><a href=\"url?user=$gettopic3[author]\"><FONT size=\"4\" color=\"#DEB887\" FACE=\"algerian\"> $gettopic3[author]</FONT></a><br>"?><?php $avatar=($gettopic3['avatar']);?><a href="url?user=<?php echo "$gettopic3[author]";?>"><img src="<?php echo $avatar; ?>" width="130" height="130"/></a></td><td vakign='top'>Last replied to at <?php echo $gettopic3[showtime];?> <br><hr>
<?php
$message=html_entity_decode($gettopic3['post']);

$message=nl2br($message);

print "$message<hr><br>";

print "</td></tr>";
print "<tr><td>";
print "<center><h2>Replies</h2></center>";
print "</td></tr>";
[B][I]$getreplies="Select * from introduction_posts where parentid='$id' order by postid desc "; //getting replies

$getreplies2=mysql_query($getreplies) or die("Could not get replies");

while($getreplies3=mysql_fetch_array($getreplies2))

{

   print "<tr class='mainrow'><td valign='top'><a href=\"url?user=$gettopic3[author]\">$gettopic3[author]</a><br>"?><?php $avatar=($getreplies3['avatar']);?><a href="url?user=<?php echo "$gettopic3[author]";?>"><img src="<?php echo $avatar; ?>" width="130" height="130"/></a></td><td vakign='top'>Last replied to at<?php echo $getreplies3[showtime];?><br><hr>
<?php
   $message=html_entity_decode($getreplies3['post']);

   $message=nl2br($message);

   print "$message<hr><br>";

   print "</td></tr>";

}
print "</table>";

[/I][/B]

?>  
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.