top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What is the difference between GET and POST Method in PHP?

+1 vote
155 views
What is the difference between GET and POST Method in PHP?
posted May 26, 2014 by Amritpal Singh

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

5 Answers

+1 vote
  1. Using GET method,we can only send 2KB of data but in POST method, there is no as such limit.
  2. When we use GET method , we see the requested data in our URL . But in POST method,the data requested is not visible in URL.
    So, POST method is safer as compared to GET method in case of sensitive request.
answer May 27, 2014 by Mohit Sharma
+1 vote

GET and POST are http protocol methods and are the two main ways of communicating with the web server. Typically GET is used for fetching the url resource ( like the web address ) and POST is used for sending some data to the server and getting a response.

However with GET also, we can achieve the same data sending but there are security concerns because URLs are visible to users.

answer May 27, 2014 by Shyam Purkayastha
+1 vote

I guess this is the best answer so far.

You use :

  • Get : for getting the data from the server to browser(in simple English) but get can send the data too. Using query string on the URL.
  • Post : for posting the data to webserver from your browser.

Security :

  • Get : Not much secured as the query string appear on the URL, so user can see your password on the URL when you click on the submit button.
  • Post : More secure, information is not sent through the URL.

Data Quantity :

  • Get : Can send few parameter of data only. The URL is actually truncate if there are tons of parameter found.
  • Post: Can easily send many parameters as well as large amounts of data,with no problem.
    Please vote + if you got the answer you were looking for.
answer Aug 13, 2014 by anonymous
0 votes

The GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ? character.
1-The GET method is restricted to send upto 1024 characters only.
2-The GET method produces a long string that appears in your server logs, in the browser's Location: box.

The POST method transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a header called QUERY_STRING.
1-The POST method does not have any restriction on data size to be sent.
2-The POST method can be used to send ASCII as well as binary data.
3-The data sent by POST method goes through HTTP header so security depends on HTTP protocol. By using Secure HTTP you can make sure that your information is secure.

answer May 30, 2014 by Vrije Mani Upadhyay
0 votes

There are two ways in which the browser can send information to the server,
1) GET Method and
2) POST Method

1) GET Method
The GET method sends the encoded client information appended to the page request.
Each request informations are separated by the question mark (?).
You can only send upto 1024 characters by GET method.
You can not send binary data like images or documents through GET methods
You can access all the data using QUERY_STRING which are send via GET methods.

2) POST Method
POST method transfer client data via HTTP headers.
There are no limit on data size.
You can also send Binary data such as images or documents.

answer Oct 3, 2014 by Salil Agrawal
Similar Questions
+1 vote

enter image description here

This pic is what i am geting error response from server(HTTP 406). Actually i am trying to post some content from CKeditor, but normal text with styles type of content is accepting by server when i add table content server not accepting.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...