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?
Change Content According to URL
Moderator: General Moderators
Re: Change Content According to URL
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.
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.