PHP / Post and Get Methods in PHP

GET method
1. It sends encoded user information append to the page request.
2. It produces a long string that appears in your server logs, in the browser's Location: box.
3. It is restricted to send upto 1024 characters only.
4. Data Sent using GET method is not secure.
5. It can't be used to send binary data, like images or word documents, to the server.

POST Method
1. It transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a header called QUERY_STRING.
2. It does not have any restriction on data size to be sent.
3. It can be used to send ASCII as well as binary data.
4. The data sent by POST method goes through HTTP header so security depends on HTTP protocol.

Program Output



Get Method Output





Program Output



Post Method Output





Home     Back