Jump to content

Query string differences


BrianM

Recommended Posts

After the filename like: http://www.example.com/index.php?act=test&do=something

 

The ? indicates the start of the query and the & is the seperator between each paramater.

 

So the URL above would return the following $_GET array:

 

[act] => test

[do]  => something

 

The use of ; in a URL is not really used as far as I am now unless you are parsing that as one of the parameter values. A common mistake is the use of & in a URL when redirecting via JavaScript. This would accidently represent the URL above like so:

 

http://www.example.com/index.php?act=test&do=something

 

However if you do use & to seperate URL's in HTML (which you should) it would take you to:

 

http://www.example.com/index.php?act=test&do=something

 

:)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.