Menu

What is the difference between GET and POST?

  • GET and POST are used to send data from one page to the other page.
  • Or it can be said that GET and POST are used to send data from client-server to the web server.
  • GET has a restriction in data size to send the data. But POST has no restriction in data size to send.
  • The GET method transfers the data using the HTTP header, whereas the POST method transfer data using the HTTP header.
  • The POST method is more secure than GET. 
  • The POST method is good for sending sensitive data.
  • The use case of the GET and POST is different.
  • For example, the GET will use in a case like searching from a database where no changes are made to the application. 
  • Normally when we use a POST function, there will be a change in the system. Eg., add a data to a database, subtract data from a database, etc.
  • GET Method to have some limit in data send from one page to the other. Only a maximum of 2 kb data can be sent using the GET Method.
  • But in the POST method, there is no limit in data send.
  • In the GET method, the requested data will show in the URL.
  • The data sent through the POST method can be access through the $_POST method.