In what cases should a form method be GET and it w

2019-08-01 08:48发布

问题:

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