+ 5
Can you please differentiate between the "get"and "post" method used in forms
The use of method in forms
9 ответов
+ 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.
+ 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)
+ 5
Post is a more secure way to get data
+ 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.
+ 3
@VINJAY.S does it mean that "post" method is more safe than "get"? or is there particular conditions for using each?
+ 3
um ok then? :)
+ 2
Thanks @Niawahta
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
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.