+ 2
Please can someone explain the difference(s) between GET and POST in html forms
Tried googling. Info there were too advanced for a beginner like me
6 Respuestas
+ 1
Your browser talks using http (that's why you see http:// and https:// in the address bar when visiting a website).
http knows different methods, like GET, POST, PUT, PATCH, HEAD, ...
If you send a GET request to a website like www.example.com you will get a response, if you send a POST request to the same website you might get a very different response.
So a html form just gives you the option to switch the http method if the other end (whatever is written in <form action="...) expects something other than GET.
Typically you will use POST if something will change on the server (you log in or create a user, you update a database...) and GET for things that don't (you want to visit the website, or read from a database).
Another obvious thing is that if you send things with GET, all the html form data will be appended to the url after the ?, like www.example.org/?user=Cole&password=1234 which can be a bad idea. In this example you should be using POST, which hides the form data (the password) somewhere else.
+ 2
GET parameters are part of URL so there are visible, POST parameters are in the HTTP request.
https://www.w3schools.com/tags/ref_httpmethods.asp
Here is a simple comparison : https://www.diffen.com/difference/GET-vs-POST-HTTP-Requests
+ 1
Donna I tried searching it. Couldn't find it.