Difference between get and post method in PHPThe browser client can deliver data to the web server in two ways.
Before sending the data, the browser encrypts it using a method known as URL encoding. Name/value pairs are connected using equal signs in this system, while distinct pairings are separated by an ampersand. Spaces are substituted with the + symbol, and any other nonalphanumeric characters are replaced with hexadecimal values. After the data has been encoded, it is transferred to the server. Now let us look at the individual methods and understand the working of these methods and understand them. Get Method:A The GET method appends encoded user information to the page request. The? character separates the page from the encoded content.
Code: Post Method:The POST method sends data to the server using HTTP headers. The information is encoded in the same way as specified for the GET method and included in a header named QUERY STRING.
Code:
Next TopicPHP append to array
|