title: Post form while retaining get variables
body: <p>This seems so simple but I can't remember how I've done it before.</p>
  
  <p>Using PHP I'm posting a form from mysite.com/?x=y and want the resulting page to be mysite.com/?x=y&amp;formx=formy...</p>
  
  <p>Options I've tried don't quite give the desired result:</p>
  
  <p><strong>action</strong> - setting <code>action="?x=y"</code> clears the get variables if <code>method="get"</code> in place of those in the form. Prior knowledge of the get variables are also required.</p>
  
  <p><strong>method</strong> - although it seems logical to set <code>method="get"</code>, this passes the form variables but clears any placed in action. Setting <code>method="post"</code> retains the current get variables but doesn't add the form variables/values.</p>
  
  <p><strong>Hidden field(s)</strong> - All get variables/values can be in hidden fields with <code>method="get"</code>. This requires prior knowledge of the get variables and a lot of duplication if there are a lot of variables or forms. <em>This so far is the closest solution.</em></p>