Different stylesheets for different pages

How can I compare links for different style sheets?

I have tried with

[php]

$curlink1 = “http://myweb.com/link1”;

if ($_SERVER[“REQUEST_URI”] == $curlink1 )
{
echo ‘’;
}

else
{
echo ‘’;
}

[/php]

But it does not work. What am i doing wrong :’(? please suggest.

Thanks :slight_smile:

Can I ask why you need to complare the ‘link’ exactly?

Is the REQUEST_URI being set correctly by your server? It might be worth echoing it for debugging:

[php]echo $_SERVER[‘REQUEST_URI’];[/php]

I would have to agree with RaythXC, as a script may have variables. So using request_uri wont work on these pages. I would have went with php_self or script_name.

Sponsor our Newsletter | Privacy Policy | Terms of Service