GETPOST

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

  1. As the browser display the url in the address bar the sensitive data will be revealed.
  2. 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.

  1. 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.
  2. In this case the data will be sent as part of the body of the “request”.