Get() and Post methods()

Difference between Get() and Post methods() ??

Last updated:7/10/2018 2:11:48 AM

1 Answers

Prakash nidhi Verma
Prakash nidhi Verma

Difference between Get() and Post methods() :

GET(Requests data from a specified resource) : 

- requests can be cached 

- $_get is an array which is passed via URL parameter

- requests remain in the browser history

- GET method is visible to everyone which is shown in URL

- requests can be bookmarked

- requests have length restrictions

- requests should be used only to retrieve data

 /test/demo_form.php?name1=value1&name2=value2 

POST(Submits data to be processed to a specified resource) : 

- requests are never cached

- $_post is an array which is passed by HTTP POST method

- requests do not remain in the browser history

- POST method is invisible to everyone which is not shown in URL

- requests cannot be bookmarked

- requests have no restrictions on data length

POST /test/demo_form.php HTTP/1.1 
Host mindstick.com
name1=value1&name2=value2

Answer