hi david,
can i make a special title page for the index.php and not use the existing title and meta tags on /html/header.php?
thanks
thanks, thats a simple method :)
would it be possible to just use the same header.php so that if i edited the header of the site i woulnd't have to edit two sites.
an IF statement is an idea.
something like if the page is index.php then show
thanks.
Hi,
Yes - you can do that quite easily using PHP superglobal variable $_SERVER["PHP_SELF"]. For example, within html/header.php you could do this:
<?php
if ($_SERVER["PHP_SELF"] == "/index.php")
{
// header code for index here
}
else
{
// header code for all other pages here
}
?>
Remember that you can break out of PHP in both those cases by closing the PHP tags - just remember to open them again before the closing }.
Cheers,
David.
Hi Osin,
You can easily make a copy of html/header.php - and call it something like html/header_index.php. Make any changes you want to the new version, and then in index.php simply replace:
require("html/header.php");
with:
require("html/header_index.php");
Hope this helps,
Cheers,
David.