title: serializing the POST array to be able to pass lots of data through a link
body: <p>I'm having a noobie problem getting my head round how I can make this work. </p>
  
  <p>I have a page listing products from my DB. On that page there is a filter form which POSTs lots of data to refine the product listing, ie how many results per-page, sort order, pricefrom, priceto plus an array of subcategories</p>
  
  <p>I also have a paging system which is just the standard zencart (<code>splitpageresults::dsplaylinks</code> incase anyone is familiar) paging system which shows links for the next, previous and some page numbers. Normally it would pass params as <code>$_GET</code> at the end of the links but I have all these fancy filters I've made.</p>
  
  <p>My idea is to serialize the <code>$_POST</code> array and send it as a <code>$_GET</code> param in the links:</p>
  
  <pre><code>&lt;a href="index.php&amp;arr=&lt;?php echo serialize($_POST[]);?&gt;"&gt;nxt&lt;/a&gt;
  </code></pre>
  
  <p>but is this seems bad all the serializing and unserializing.</p>
  
  <p>What's the best way of doing this?</p>
  
  <p>I can't figure it out!</p>