What is the difference between GET, POST and REQUEST method in PHP?

There are 2 methods to send HTML form data from 1 Page to another or HTML page to server side in PHP.

POST

It is a method in which data gets sent using packet which is not visible to any user on web-browser. it is secured compared to GET method.

GET

It is a method in which data gets sent with URL which is visible to user in address-bar of any web-browser. So, it’s not secure as POST method.

Now, There are total three methods to catch this data in PHP.

  • POST: It can catch the data which is sent using POST method.
  • GET: It can catch the data which is sent using GET method.
  • REQUEST: It can catch the data which is sent using both POST & GET methods.

No comments:

Post a Comment

Labels