title: While Loop, show only 50 records and more?
body: <p>I have a query on a page, which then echoes out a while loop to display ALL records. I want to limit this to 25 but also have a dynamic next/previous button so I can skip through the records. I've seen something similar but I cannot figure it out or find the tutorial I saw. I'm new to PHP so any help would be great.</p>
  
  <pre><code>&lt;?PHP
  $result = mysql_query("SELECT id, firstname, surname FROM members WHERE createdby = '" . $_SESSION['myusername'] ."'");
  if (!$result) {
      echo 'Could not run query: ' . mysql_error();
      exit;
  }
  while($row = mysql_fetch_row($result))
  {
  $id=$row[0];
  echo ("&lt;a href=profile.php?id=$id&gt;".$row[1]." ".$row[2]."&lt;/a&gt;");
  }
  ?&gt;
  </code></pre>