Many of you must be aware that a “form” element in HTML has a method attribute, most of you set it to either GET or POST. In my previous post, I explained what is a simple GET request. This time… Its POST’s turn.
There is a common knowledge, that if you want to hide the data that is submitted, you use POST. But is it that the data is really hidden? The browser is a client and the client MUST send the data to the server, in a GET request the data is sent in a query string.
Consider you have a form with two elements “name” and “sex”. Consider the first scenario where the form’s method attribute is set to GET.
form .. method=”GET” .. action=”/somepage.php”
When the user submits the data, the name-value pairs of the form elements are url-encoded and transmitted in the URL as..
/somepage.php?name=ruturajv&sex=m
(more…)