title: php get the post data when using pagination script
body: <p>I have a page called mainPage.php that contain a pagination script which displays a list of pages.</p>
  
  <pre><code> [1][2][3][4][5] 
  </code></pre>
  
  <p>the pagination works fine but when I go to the next page the post data disappear.</p>
  
  <pre><code>for($i=1;$i&lt;=$totalPage;$i++)
  {
  if($page==$i)
  {
  echo ' &lt;input  type="button" value="'.$i.'"&gt; ';
  }
  else
  {
  echo '&lt;a href="mainPage.php='.$i.'"&gt; &lt;input type="button" value="'.$i.'"&gt; &lt;/a&gt;';
  }}
  </code></pre>
  
  <p>is there any way to get the post data to the next page number after clicking this link:</p>
  
  <pre><code> &lt;a href="mainPage.php='.$i.'"&gt; 
  </code></pre>
  
  <p>without the form.</p>