<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td> 
                  <?php 
			$sql = "SELECT * FROM reviews";
			$result = mysql_query($sql);
			$num_rows = mysql_num_rows($result);
?>
  <?php 
$start = mysql_real_escape_string($_REQUEST['start']);
?>
<?php if ($start=='') { 
$start=$num_rows*10;
}?>
                  <?php
			$sql1 = "SELECT * FROM reviews WHERE id<'$start' ORDER BY id desc LIMIT 10";
			$result1 = mysql_query($sql1);
			while ($myrow=mysql_fetch_array($result1)) {
			$id=$myrow['id'];
			$name=$myrow['rTitle'];
			$comments=$myrow['revText'];
			$rate=$myrow['value'];
			$date=$myrow['revDate'];
			$ppriority=$myrow['id'];
?>
                </td>
              </tr>
              <tr> 
                <td valign="top"> 
             <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr> 
                                  
                            <td><span class="titles"> 
                              <?php echo $name ?>
                              </span> 
                              <?php echo $city  ?>
                              
                              <?php echo $country  ?>
                            </td>
                                  <td width="100" align="right"> 
                                      <?php  echo $date ?>
                                  </td>
                                  <td width="50" align="right">
                                   <?php if ($rate>0) { ?>
                                <img src="<?php echo $sitepath ?>images/rate.png" alt=""> <span class="rate"><?php echo $rate ?></span>
                                <?php }?>
                                  </td>
                                </tr>
                              </table>
 <hr>
<?php echo $comments ?>
          
                </td>
              </tr>
              <tr> 
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td> 
                  <?php			
	}
?>
                </td>
              </tr>
              <tr> 
                <td align="center"> 
                   <?php 
			$sql2 = "SELECT * FROM reviews WHERE id>'$start' ORDER BY id LIMIT 10";
			$result2 = mysql_query($sql2);
			while ($myrow=mysql_fetch_array($result2)) {
			$ppriority1=$myrow['id'];
}?>
                  <?php 
			$sql3 = "SELECT * FROM reviews WHERE id>'$ppriority1' ORDER BY id LIMIT 1";
			$result3 = mysql_query($sql3);
			$num_prev = mysql_num_rows($result3);
?>
                  <?php if ($num_prev==0 AND $num_rows>0) { 
$startpr=$ppriority1+1;
} else {
$startpr=$ppriority1;
}?>
                  <?php if ($startpr!='') { ?>
                  <a href="reviews.php?start=<?php echo $startpr ?>"> 
                  <img src="<?php echo $sitepath ?>images/prev.png" alt="previous"></a> &nbsp; 
                  <?php } ?>
                  <?php
			$sql4 = "SELECT * FROM reviews WHERE id<'$ppriority'";
			$result4 = mysql_query($sql4);
			$num_items = mysql_num_rows($result4);
?>
                  <?php 
	if  ( ( $num_items!=0)) {
	?>
                  <a href="reviews.php?start=<?php echo $ppriority ?>"> 
                  <img src="<?php echo $sitepath ?>images/next.png" alt="next"></a> 
                  <?php } ?>
                </td>
              </tr>
            </table>