Difference between the GET and POST
When the form is submitted the browser collects the data, appends the data as a query string to the URL and sends the Get Request to the server.
Problems with GET request
- As the browser display the url in the address bar the sensitive data will be revealed.
- As there is a limit on(1024 bytes) the size of the URL, the browser may not be able to send huge amount of data to the server using the GET request.
The problems discussed above can be overcome by using the POST request method.
- If we use method=”POST” in the form tag the browser collects the data and sends the data to the server using the post request.
- In this case the data will be sent as part of the body of the “request”.