title: PHP Pagination : Prev and Next button work but table won't show up
body: <p>I'm following some example of PHP paging with ODBC on the internet and change them according to my own use. </p>
  
  <p>I've managed to make to <code>NEXT</code> and <code>PREVIOUS</code> worked. The URL of the page change when the <code>NEXT</code> or <code>PREVIOUS</code> is clicked. For example when I clicked <code>NEXT</code> this is the URL <code>localhost/mypage.php?page=2</code>.</p>
  
  <p>The issue here is the table of the data won't show up. </p>
  
  <p>This is my code :</p>
  
  <pre><code>function inv_rows($r1)  
  {
  ob_start(); 
  (int)$number = odbc_result_all($r1);
  ob_clean(); 
  return $number;
  }
  
  $page = isset($_GET["page"]) ? $_GET["page"] : 1;  
  
  if(empty($page)){$page = 1; 
  }           
  $query = "SELECT UserId, UserNm FROM User"; 
  $num_result = odbc_exec($db, $query);
  $numrows = inv_rows($num_result);   
  
  $limit = 10;
  $offset = ($page - 1) * $limit;
  
  $sql = odbc_exec($conn,"SELECT UserId, UserNm FROM User LIMIT $limit OFFSET $offset"); 
  
  
  $result = odbc_exec($db, $sql);
  
  echo "&lt;table style='width: 600;'&gt;";
  
  while(odbc_fetch_row($result))
  {
  echo "&lt;tr&gt;
  &lt;td style='width: 300; height: 15px;&gt;";
  echo odbc_result_all($result, "UserId");
  echo "&lt;/td&gt;
  &lt;td style='width: 300; height: 15px;'&gt;";
  echo odbc_result_all($result, "UserNm");
  echo "&lt;/td&gt;
  &lt;/tr&gt;";
  }
  
  echo "&lt;/table&gt;";
  if($page !=1)
  {
  $pageprev = $page - 1;
  echo "&lt;a href='paging2.php?page=$pageprev' style='text-decoration: none'&gt;&amp;nbsp; PREVIOUS&amp;nbsp;&lt;/a&gt;";
  }
  else
  { 
  echo "&amp;nbsp; PREVIOUS &amp;nbsp;"; 
  }
  
  if(($numrows - ($limit * $page)) &gt; 0)
  {
  $pagenext = $page + 1;
  echo "&lt;a href='paging2.php?page=$pagenext' style='text-decoration: none'&gt;NEXT&lt;/a&gt;"; }
  else
  { 
  echo "&amp;nbsp; NEXT &amp;nbsp;"; 
  }
  
  odbc_free_result($result);            
  exit;
  ?&gt; 
  </code></pre>
  
  <p>I'm sure I miss something. Please guide me. Thank you.</p>