0
這不起作用。舊參數丟失。我得到http://x.x.x.x/temp/test.php?mode=compound如何在PHP中添加現有的url參數提交表單?
<form align="right" action="http://<? echo $_SERVER['SERVER_ADDR']."/temp/test.php?".$_SERVER['QUERY_STRING'];?>">
<? if ($_SESSION['mode']=="simple") { ?>
<input type="submit" value="Switch to compound mode">
<input type="hidden" name="mode" value="compound">
<? } else { ?>
<input type="submit" value="Switch to simple mode">
<input type="hidden" name="mode" value="simple">
<? } ?>
</form>
沒有不行。我仍然得到url http://x.x.x.x/temp/test.php?mode = simple – 2013-02-18 12:32:03