+ 2

Where or how does "<form action="url" method="GET">" and "<form action="url" method="POST"> come into play?

1st May 2018, 8:28 AM
Areeba
5 Réponses
+ 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
1st May 2018, 9:31 AM
KrOW
KrOW - avatar
+ 5
when you need to receive html input and send it to php,where you either store it or use it
1st May 2018, 9:00 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 2
👍👍👍
1st May 2018, 10:25 AM
KrOW
KrOW - avatar
+ 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
1st May 2018, 11:33 AM
Corrado Battagliese
Corrado Battagliese - avatar
0
good description! I understand now.Ty :)
1st May 2018, 10:24 AM
Areeba