+ 2
Where or how does "<form action="url" method="GET">" and "<form action="url" method="POST"> come into play?
5 ответов
+ 6
GET make possible bookmarks your url with data (at example on url "https://example.com/login.php" and with params name=krow and pwd=sololearn it will transformed to final url "https://example.com/login.php?name=krow&pwd=sololearn") then it allow to see params throught url and is bad for private data (like this case)... With POST params are transmitted with http request and not appears in url then you cannot bookmarks it but you privacy is more protected
+ 5
when you need to receive html input and send it to php,where you either store it or use it
+ 2
👍👍👍
+ 2
There are various kinds of REST calls.
Under the hood they are quite interchangeable, but they carry a
GET: the user wants to see information in a db. The form data in this case could be parameters of a query
POST: the user wants to add information to the server (eg: adding a new post in a blog)
PUT: the user wants to modify information on the server (eg: correct something in the aforementioned post in a blog)
DELETE: the user wants to delete something on the server
For more documentation:
https://en.m.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods
0
good description! I understand now.Ty :)