The POST method was intended to create a resource. The contents of the resource would be encoded into the body of the HTTP request.
The GET method is different in that it passes the variables along to the PHP web page by appending them onto the end of the URL
Use the POST method if any of the following are true:
-
The result of the request has persistent side effects such as adding a new database row.
-
If the data collected on the form is likely to result in a large URL if implemented using the GET method.
-
The data to be sent is in any encoding other than seven-bit ASCII.
Use the GET method if all the following are true:
-
If the request is essentially finding a resource, and HTML
form data is to help that search. -
The result of the request has no persistent side effects.
-
If the data collected and the input field names in a HTML
are less than 1,024 characters in length.