Skip to main content

What is difference between get and post method in php

By July 29, 2017December 10th, 2017HTML, PHP

What is HTTP? The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers. HTTP works as a request-response protocol between a client and server.

Two HTTP Request Methods commonly used for request-response between a client and server: GET and POST

The GET Method

Following example which shows you how to use get method.

Following are GET Request Method Points.

  1. Request can be cached
  2. Requests can be bookmarked
  3. Requests remain in the browser history
  4. Requests have length restrictions
  5. Requests should be used only to retrieve data
  6. Requests should never be used when dealing with sensitive data
  7. Maximum path length of 2,048 characters
  8. Data visible to everyone in URL
  9. GET is less secure compared to POST because data sent is the URL.

Following are POST Request Method Points.

  1. Requests are never cached
  2. Requests do not remain in the browser history
  3. Requests cannot be bookmarked
  4. No restriction data length
  5. Requests have no restrictions on data length
  6. Data is not displayed in URL
  7. POST is a little safer than GET because the parameters are not stored in browser history.

We just started this developer diary for a beginner programmer to find a technical solution which we went through with our experience. If anyone to be a part of this please feel free share with us your problem with solutions. So we can share with more needed coder.

Leave a Reply

2 + 5 =

Open chat
💬 Need help?
Hello 👋
We are expert at building website and digital properties. Do you have an idea that you want to bring to life. Let us know and we will build it for you.