Submit HTML form with GET method with full action path

会有一股神秘感。 提交于 2019-12-11 09:09:28

问题


I am trying to submit a form with method GET and action "index.php?id=3". The problem is that it jumps to the url specified but it cuts off "?id=3" part. I need that so I can identify an user. Any ideas on how I could submit the whole url ? I don't want to change this method, by design is much complex than I told you here. It's a simple version.

Any ideas ? Thanks.


回答1:


Add a hidden field (<input type="hidden" name="id" value="3" />) in the form and use just index.php as the action.



来源:https://stackoverflow.com/questions/2617592/submit-html-form-with-get-method-with-full-action-path

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!