title: how to append existing url parameters in html submit form with php?
body: <p>this doesn't work . Old parameters are lost . I get <a href="http://x.x.x.x/temp/test.php?mode=compound" rel="nofollow">http://x.x.x.x/temp/test.php?mode=compound</a></p>
  
  <pre><code>&lt;form align="right" action="http://&lt;? echo $_SERVER['SERVER_ADDR']."/temp/test.php?".$_SERVER['QUERY_STRING'];?&gt;"&gt;
  &lt;? if ($_SESSION['mode']=="simple") { ?&gt;
  &lt;input type="submit" value="Switch to compound mode"&gt;
  &lt;input type="hidden" name="mode" value="compound"&gt;
  &lt;? } else { ?&gt;
  &lt;input type="submit" value="Switch to simple mode"&gt;
  &lt;input type="hidden" name="mode" value="simple"&gt;
  &lt;? } ?&gt;
  &lt;/form&gt;
  </code></pre>