In what cases should a form method be GET and it what cases should it be POST [closed]

纵然是瞬间 提交于 2019-12-11 08:14:36

问题


When creating an HTML form, in what cases should the form use the GET method and it what cases should the POST method be used. This is a simple question to explain the options of using the two depending on how the form and the information will be handled and how it would help to use one of them.


回答1:


Had this question recently myself. Best description I found of the differences was here:

http://www.w3schools.com/tags/ref_httpmethods.asp




回答2:


Well, I am noob, but I can say that allways use the $_GET[''] global when information sent to server is not of any security risk. ex: You can not send a password through the URL, on the other hand, you should always use POST for submitting a sensitive data



来源:https://stackoverflow.com/questions/14819885/in-what-cases-should-a-form-method-be-get-and-it-what-cases-should-it-be-post

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