Re: Calling page and condition check?
| From: | Jim Giner | Date: | Mon, 16 Jun 2014 15:20:58 +0000 |
| Subject: | Re: Calling page and condition check? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323489@lists.php.net to get a copy of this message | ||
On 6/16/2014 11:08 AM, Joey J wrote:
<? $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"; ?> You're saying that the above code shows you a valid calling_page value in line 2 that matches one that you are looking for in the if else statements beginning at line 3? Is this code located in the header section of your html page?