title: How to retain current URL parameters when submitting a form?
body: <p>I have a PHP-based sorting method with a drop-down menu to sort rows. It works. I have another sorting links to sort id and title. It also works. But together they do not work.</p>
  
  <p>When I sort (say by title) using links, the result gets sorted by title, then if I sort rows using my drop-down menu, rows get sorted, but the result gets set back to the default of id sort.</p>
  
  <p>My sorting code for ID and title:</p>
  
  <pre><code>    if ($orderby == 'title' &amp;&amp; $sortby == 'asc')
  {echo " &lt;li id='scurrent'&gt;&lt;a href='?rpp=$rowsperpage&amp;order=title&amp;sort=asc'&gt;title-asc:&lt;/a&gt;&lt;/li&gt; ";}
  else {echo " &lt;li&gt;&lt;a href='?rpp=$rowsperpage&amp;order=title&amp;sort=asc'&gt;title-asc:&lt;/a&gt;&lt;/li&gt; ";}   
  
  if ($orderby == 'title' &amp;&amp; $sortby == 'desc')
  {echo " &lt;li id='scurrent'&gt;&lt;a href='?rpp=$rowsperpage&amp;order=title&amp;sort=desc'&gt;title-desc:&lt;/a&gt;&lt;/li&gt; ";}
  else {echo " &lt;li&gt;&lt;a href='?rpp=$rowsperpage&amp;order=title&amp;sort=desc'&gt;title-desc:&lt;/a&gt;&lt;/li&gt; ";} 
  
  if ($orderby == 'id' &amp;&amp; $sortby == 'asc')
  {echo " &lt;li id='scurrent'&gt;&lt;a href='?rpp=$rowsperpage&amp;order=id&amp;sort=asc'&gt;id-asc:&lt;/a&gt;&lt;/li&gt; ";}
  else {echo " &lt;li&gt;&lt;a href='?rpp=$rowsperpage&amp;order=id&amp;sort=asc'&gt;id-asc:&lt;/a&gt;&lt;/li&gt; ";}     
  
  if ($orderby == 'id' &amp;&amp; $sortby == 'desc')
  {echo " &lt;li id='scurrent'&gt;&lt;a href='?rpp=$rowsperpage&amp;order=id&amp;sort=desc'&gt;id-desc:&lt;/a&gt;&lt;/li&gt; ";}
  else {echo " &lt;li&gt;&lt;a href='?rpp=$rowsperpage&amp;order=id&amp;sort=desc'&gt;id-desc:&lt;/a&gt;&lt;/li&gt; ";} 
  ?&gt;
  </code></pre>
  
  <p>My sorting codes for rows:</p>
  
  <pre><code>&lt;form action="is-test.php" method="get"&gt;
  &lt;select name="rpp" onchange="this.form.submit()"&gt;    
  &lt;option value="10" &lt;?php if ($rowsperpage == 10) echo 'selected="selected"' ?&gt;&gt;10&lt;/option&gt;
  &lt;option value="20" &lt;?php if ($rowsperpage == 20) echo 'selected="selected"' ?&gt;&gt;20&lt;/option&gt;
  &lt;option value="30" &lt;?php if ($rowsperpage == 30) echo 'selected="selected"' ?&gt;&gt;30&lt;/option&gt;   
  &lt;/select&gt;
  &lt;/form&gt;    
  </code></pre>
  
  <p>This method passes only rows per page (rpp) into url. I want it to pass order, sort, and rpp. Is there a way to pass these multiple values in form fields.</p>