Member Avatar for Rahul47

Hi friends, recently i am learning php with your help and online tutorials. I googled for anatomy of GET and POST but didnt find satisfaction.

So what is working behind GET and POST Methods ? How they work between client(browser) and Server ?


Recommended Answers

All 3 Replies

A simple tutorial:

Noce explanation on W3schools:

A technical specification as a part of of the HTTP protocol:

And all this leads to:

In simplified terms: use GET to retrieve data from the server, use POST to send data to the server, when you are familiar with the thing, read about the REST (the last two links). I am not expert on the later so maybe others will tell more.

Anatomy of an HTTP GET request
The path to the resource, and any parameters added to the URL are all included on the request line".

Anatomy of an HTTP POST request
HTTP POST requests are designed to be used by the browser to make complex requests on the server. For instance, if a user has just completed a long form, the application might want all of the form's data to be added to a database. The data to be sent back to the server
is known as the "message body" or "payload" and can be quite large.

Member Avatar for Rahul47

@crescendo: I am aware of working of GET and POST methods. I wanted to learn about how they work behind the scene, and transfer data to $_GET and $_POST associative variables.

Appreciate your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.