title: Pagination while using a GET variable
body: <p>I have had a difficult time paginating the code below.  I think it has to do with passing the GET variable $find on to the next page.</p>
  
  <p>Anyway, how would I paginate the code below, so that the table below shows only 100 rows per page?</p>
  
  <p>Thanks in advance,</p>
  
  <p>John</p>
  
  <pre><code>&lt;?php
  ob_start();
  session_start();
  $find = strip_tags($_GET['find']);
  $illegal = array("'", ".", "/", "\"", ";", "{", "}", "[", "]", "\\", "''", "'''", "''''", "'''''", "\\\\", "\\\\\\", "\\\\\\\\");
  $find = str_replace($illegal, '', $find);
  $find = trim ($find);
  $find = strtolower($find);
  $find = stripslashes($find);
  $_SESSION['find'] = $find;
  ?&gt;
  
  &lt;?
  if ($searching =="yes")
  {
  
  if ($find == "")
  {
  session_write_close();
  header("Location:http://www.site.com/index.php");
  exit;
  unset($_SESSION['find']);   
  
  }
  
  mysql_connect("mysqlv10", "username", "password") or die(mysql_error());
  mysql_select_db("database") or die(mysql_error());
  $find = mysql_real_escape_string($find);
  
  $result=mysql_query("SHOW TABLES FROM database LIKE '$find'")
  or die(mysql_error());
  
  if(mysql_num_rows($result)&gt;0){
  while($table=mysql_fetch_row($result)){
  print "&lt;p class=\"topic\"&gt;$table[0]&lt;/p&gt;\n";
  $r=mysql_query("SELECT * , votes_up - votes_down AS effective_vote FROM `$table[0]` WHERE site != '' ORDER BY effective_vote DESC");
  
  print "&lt;table class=\"navbar\"&gt;\n";
  while($row=mysql_fetch_array($r)){
  
  $effective_vote = $row['votes_up'] - $row['votes_down']; 
  
  print "&lt;tr&gt;";
  
  print "&lt;td class='sitename'&gt;".'&lt;a type="amzn" category="products" class="links2"&gt;'.$row['site'].'&lt;/a&gt;'."&lt;/td&gt;";
  
  print "&lt;td class='votes'&gt;".'&lt;span class="votes_count" id="votes_count'.$row['id'].'"&gt;'.number_format($effective_vote).'&lt;/span&gt;'."&lt;/td&gt;";
  print "&lt;td class='ballot'&gt;".'&lt;span class="button" id="button'.$row['id'].'"&gt;'.'&lt;a href="javascript:;" class="cell1" id="'.$row['id'].'"&gt;'.vote.'&lt;/a&gt;'.'&lt;/span&gt;'."&lt;/td&gt;";
  }
  print "&lt;/tr&gt;\n";
  }
  print "&lt;/table&gt;\n";
  
  }
  ?&gt;
  </code></pre>