title: Append form value to URL that already has variables in it
body: <p>I've got a page showing the results of a MYSQL query written in PHP. The URL has the variables that the user submitted on the previous page as:</p>
  
  <p>www.mydomain.com/search/?var1=xx&amp;var2=xx&amp;var3=xx</p>
  
  <p>When the user is on the results page they need to be able to sort the results. To do this I've got a SELECT form </p>
  
  <pre><code>&lt;form action="/search&lt;?php echo $urlQuery; ?&gt;"  name="order "class="formsrch" method="post" &gt;
              &lt;label&gt;sort by:&lt;/label&gt;
              &lt;select class="order" id="order" name="order" onChange="this.form.submit()"&gt;
                  &lt;option value="pricedesc"&gt;Price High to Low&lt;/option&gt;
                  &lt;option value="priceasc"&gt;Price Low to High&lt;/option&gt;
                  &lt;option value="dist"&gt;Distance&lt;/option&gt;
              &lt;/select&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>The variable $urlQuery contains the string to be appended onto the url: 
  i.e. $urlQuery = "?var1=xx&amp;var2=xx&amp;var3=xx"</p>
  
  <p>The problem is that when the form is submitted the page is reloaded and at the end of the url is ?order=dist.</p>
  
  <p>Is there a way of replacing the question mark with an ampersand so the page will load and the value of order can be retreived?</p>
  
  <p>Or, if anyone has a better way of doing the whole thing I'm definitely open to suggestions.
  Thanks</p>