Querystring
For dynamic webpages, when value-keys are passed between a web client (usually a Web browser) and the server, this info can be passed through two methods. First, for HTTP GET requests, the URL used has a querystring appended to it that the web server, through naming conventions, separates and passes to the dynamic page. Secondly, for HTTP POST requests, value-key pairs are passed as separate parts of the HTTP request.
Querystring format conventions
The querystring and the regular components of the URL are separated by a question-mark (?). After that, pairs of key=value pairs follow, separated by the ampersand (&) character. Characters that are not valid parts of a request string are encoded into alternate forms (and usually decoded by the dynamic page) according to a static set of rules. An example URL with a querystring follows:
http://localhost/cart/example.php?lang=en&size=10&uid=50
In this example, there are three keys:
- lang, which has the value "en"
- size, which has the value "10"
- uid, which has the value "50"