title: Pagination in while loop with php
body: <p>I'm newbee about php,trying to learn.
  I've search other topic about while loop pagination but not satisfied.</p>
  
  <p>I have 70 user records in my database,wants to list them with html table. I'm showing all records with this code. How can i make simple pagination with these codes? Please help me.</p>
  
  <pre><code>&lt;table class="table"&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;ID&lt;/th&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Surname&lt;/th&gt;
          &lt;th&gt;Email&lt;/th&gt;
          &lt;th&gt;Password&lt;/th&gt;
          &lt;th&gt;Date&lt;/th&gt;
          &lt;th&gt;Gender&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
  
      &lt;?php
      $q = "SELECT * FROM users ORDER BY uid ASC";
      $r = mysqli_query($dbc,$q);
  
      while($userlist = mysqli_fetch_assoc($r)){ ?&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;?php echo $userlist['uid']; ?&gt;&lt;/td&gt;
            &lt;td&gt;&lt;?php echo $userlist['name']; ?&gt;&lt;/td&gt;
            &lt;td&gt;&lt;?php echo $userlist['surname']; ?&gt;&lt;/td&gt;
            &lt;td&gt;&lt;?php echo $userlist['email']; ?&gt;&lt;/td&gt;
            &lt;td&gt;&lt;?php echo $userlist['password']; ?&gt;&lt;/td&gt;
            &lt;td&gt;&lt;?php echo $userlist['date']; ?&gt;&lt;/td&gt;
            &lt;td&gt;&lt;?php echo $userlist['gender']; ?&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;?php } ?&gt;     
      &lt;/tbody&gt;
    &lt;/table&gt;
  </code></pre>