Log in

View Full Version : url address techniques



davidjmorin
01-22-2008, 01:40 AM
what is it called when creating a link like this
mysite.com/index.php?=mystuff

what is that technique called?

djr33
01-22-2008, 02:59 AM
Within PHP, the most common use of that technique, it's called a GET variable. It's available in the $_GET[] array, under $_GET['namehere'], where ?namehere=value.

This "get" method is an alternative for forms (method="get") rather than the usual "post" method. It can be generated manually, or through a form. POST, on the other hand, is usually only done with a form (other ways exist, but they are difficult to achieve).

(Note: "GET" is usually capitalized, for some strange reason.)

These values would also be available with another server side language (CGI, ASP, etc), or javascript, but PHP has this setup as a default, so it's easy.

jscheuer1
01-22-2008, 03:31 AM
It's a query string.

http://en.wikipedia.org/wiki/Query_string