Get, Post or Request?
what is the difference and wich one should i use if i want to make a login page?
also, on a different note, when you submit a form, is there anyway to make it not reload, but change the page?
For a login form I would advise using the POST method, just because it's safer.
I guess it's about security. POST is used if the service associated with the processing of a form has side effects.
Maybe finding an equivalence between CRUD and HTTP Verbs, we have:
Although we have four verbs , PUT and DELETE aren't implemented in the majority of browsers.
Hope it helps.
With the get method, the form data is appended to the URL which is bookmarkable.
With the post method the form data is after the http header in one of 2 formats.
If the filled out form could result in over 2k of info you need to use method="post" (mostly because of IE as IE can't handle URLs that long)
If you want the users to be able to to be bookmark the resulting page use method="get"
The easy way to submit a form and not make it goto a new page is to submit the form the good old ajax way.
You also have HEAD, TRACE, OPTIONS and CONNECT, besides GET, POST, DELETE and PUT.
Only HEAD, GET and POST are commonly used for normal web pages. HEAD and GET aren't supposed to change the state of the website, POST is.
POST is the secure one because none of the input in a form are shown in the address bar of the browser but in GET we can see the inputs directly.
GET and POST the names are really suggestive of what they're intended for.
On one hand, you GET the contents of some information, presumably that will still be there later.
Whereas, you POST your data to some place, and you would not want to do it again by accident.
Some advice is that only POST should modify any state in your application.
albuferque reply has helped me nicely to comprehend,
I'll use POST now for my login
i rarely use Request
for login, i just use post
for anything else that no need security, i use get