我使用GET方法已經包含像參數中的URL提交表單腓get方法resseting網址
本地主機/ myfile.php?節=控制檯
我的表單代碼
<form method="GET" action="<?=basename($_SERVER['PHP_SELF'])?>/section=console">
<input type="text" name="cmd" />
<input type="submit" value="execute" />
</form>
當我通過郵遞方式提交這個數據時,它提交數據然後提交像myfile.php?cmd = blahblah 但我想提交給myfile.php?section = console & cmd = blahblah。
我可以使用隱藏域做到這一點,但我INSEARCH學院的其他更好的辦法
只需將查詢字符串的當前URL作爲表單動作 – 2014-09-18 18:32:16
我沒有明白,請您解釋 – 2014-09-18 18:41:38
爲什麼不使用「/myfile.php?section=console」作爲表單動作? – 2014-09-18 19:50:14