Calling page and condition check?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,

I'm calling an include of a header which contains the below code.
I want to figure out the page calling header so I created $calling_page and
when I run it, the page ECHO works but the condition never matches, nor
does the $calling_page value show up in the title.
Any ideas?


<?
$calling_page=$_SERVER['SCRIPT_NAME'];
echo $calling_page;
if ($calling_page == "/index.php") {
$title = "Page home";
} elseif ($calling_page == "/contact-us.php") {
$title = "Page -- Contact";
} else {
$title = "Default";
}
echo "<title>".$title."   ". $calling_page ."</title>\n";
?>

-- 
Thanks!
Joey

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux