+ 5

Can you please differentiate between the "get"and "post" method used in forms

The use of method in forms

5th Oct 2017, 1:49 AM
Michael Damilare
Michael Damilare - avatar
9 Respuestas
+ 3
To generalize the above excellent answers, use GET for something like a search bar, and use POST for sensitive info, like forms with passwords and emails.
5th Oct 2017, 2:17 AM
LunarCoffee
LunarCoffee - avatar
+ 7
GET submits form variables as a "query string" in the URL: http://www.site.com?var1=foo&var2=bar POST submits form variables in the HTTP request data and does not appear in the URL at all. This is not more secure; it just makes it slightly more difficult to send the same data again. Example: A file upload would be POSTed. GET is intended to be repeatable without affecting server data Always returning the same result, like reading POST is intended to change server data (like writing) and should NOT be 'just repeated'. if you do, expect different results "Are you sure you want to resubmit this page?" ** From memory. Anybody's welcome to check me. Official link: https://www.w3schools.com/TAgs/ref_httpmethods.asp Additional reading: idempotent / safe method calls (REST)
5th Oct 2017, 2:08 AM
Kirk Schafer
Kirk Schafer - avatar
+ 5
Post is a more secure way to get data
5th Oct 2017, 2:06 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
simpel brother GET method send or pass your input throw URL to reach server and every one can see FOR Ex GET :- www.google.com/search?m=wikipedia you can see you want wikipedia and search on google search engine. the search engine pass your input through URL everyone can see on link. POST method no one can visible POST method pass your input securely and it hide also on link FOR Ex POST :- www.google.com/myaccount Remember you passing email id, mobile no, credit card details you can use POST method because if use GETmethod it danger.
5th Oct 2017, 1:58 AM
Vinay.s
Vinay.s - avatar
+ 3
@VINJAY.S does it mean that "post" method is more safe than "get"? or is there particular conditions for using each?
5th Oct 2017, 2:03 AM
Michael Damilare
Michael Damilare - avatar
+ 3
um ok then? :)
5th Oct 2017, 2:20 AM
LunarCoffee
LunarCoffee - avatar
+ 2
Thanks @Niawahta
5th Oct 2017, 2:18 AM
Michael Damilare
Michael Damilare - avatar
0
@Michael Damilare $_POST method use it secure and u can put unlimited inputs but $_GET only accept input only 1000 or 1020 i think. better use POST method brother. i hope understand any thing else replay posting on here @Vinay.s . bye
5th Oct 2017, 2:21 AM
Vinay.s
Vinay.s - avatar
0
GET requests a representation of the specified resource. Note that GET should not be used for operations that cause side-effects, such as using it for taking actions in web applications. One reason for this is that GET may be used arbitrarily by robots or crawlers, which should not need to consider the side effects that a request should cause. POST submits data to be processed (e.g., from an HTML form) to the identified resource. The data is included in the body of the request. This may result in the creation of a new resource or the updates of existing resources or both. So essentially GET is used to retrieve remote data, and POST is used to insert/update remote data.
5th Oct 2017, 5:39 PM
Abu Sayem