Page 1 of 1

Change Content According to URL

Posted: Wed Apr 14, 2010 6:19 am
by thirteen
I need to display different content according to the URL of the website.

For example:

If the url is: http://test.com/page.php?id=10&p=17&s=25&i=26 then the html displays <p>This is the first page</p>
If the url is: http://test.com/page.php?id=10&p=18&s=109&i=104 then the html displays <p>This is the second page</p>

How can it be done?

Re: Change Content According to URL

Posted: Wed Apr 14, 2010 6:50 am
by eskio
HI,
u have to retrieve your url variable with $_GET[].
$url_id = $_GET['id'];
$url_p = $_GET['p'];
$url_s = $_GET['s'];
$url_i = $_GET['i'];
and the u can use "if" or "switch" statement.