Storing Select/Dropdown Value across multiple pages
<p>I'm making a new website to learn coding and am making a results per page for a search application. So basically, I have a select/dropdown that looks like this:</p>

<pre><code> &lt;form name='form1' method='post'&gt;
       &lt;font style="font-size:12px;"&gt;Results per Page:&lt;/font&gt;
       &lt;select name='select' onChange='document.form1.submit()'&gt;
              &lt;option value='10'&lt;?php if($pagesnum == 10) {echo "selected='selected'";} ?&gt;&gt;10&lt;/option&gt;
              &lt;option value='15'&lt;?php if($pagesnum == 15) {echo "selected='selected'";} ?&gt;&gt;15&lt;/option&gt;
          &lt;option value='20'&lt;?php if($pagesnum == 20) {echo "selected='selected'";} ?&gt;&gt;20&lt;/option&gt;
          &lt;option value='25'&lt;?php if($pagesnum == 25) {echo "selected='selected'";} ?&gt;&gt;25&lt;/option&gt;
      &lt;/select&gt;
&lt;/form&gt;
</code></pre>

<p>This is just is taking the user's desired number of results per page and once they change the select/dropdown the page is refreshed. Then I store the users results per page data into a variable called $pagesnum or if the results per page isn't set, just set the $pagesnum to 10 like this (it goes at the very top of the page:</p>

<pre><code>if ($_REQUEST['select'] != null){ $pagesnum = $_REQUEST['select'];}else{$pagesnum = 10;}
</code></pre>

<p>Then I ,in my pagination, (which I can post if you need it here) makes the total results per page or $totalpages equal to $pagesnum like this:</p>

<pre><code>$total_pages = $pagesnum;
</code></pre>

<p>My problem is that I have a Refine Search which suggests related search terms that link to pages like search.php?q=A+Link+That+is+a+different+page and the value of $pagesnum is lost. How do I get what the user sets as $pagesnum and have it set across multiple pages?</p>
