Hi dudes! I use header.php and footer.php on my website so I have <head></head>-information on header.php. My problem is that now the title of website is always same also on different pages. What I have to do to get changing title by page? Thanks!
if you use the header.php with the information in all pages,i think that there is any way to change it using the same header.php
Of course you can do this, you can do anything with PHP. How many pages? And is this a custom script?
There is just about 10 pages! I haven´t any script. I just use <?php include("header.php"); ?> in pages and it includes <html><head></head><body> ... etc ... info to every single page!
Exactly... there is a PHP formula (code) to tell the script what page you're on and generate a title... easy Post the beginning of your header.php and a couple of sample page urls and I can give you code.
I use PHP includes on all my websites, but I leave the <title> of the page not included in the include. Maybe you can leave the title part out and do it yourself on each individual page? Proprod, this is PHP include and has little to do with script unless it is something completely separate.
Here´s my header.php: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta name="description" content="Site for finnish Manowarfans - Sivusto suomalaisille Manowarfaneille"> <meta name="keywords" content="manowar, manowar forum, manowar foorumi, manowar suomi, magic circle festival, magic circle music, battle hymns, into glory ride, hail to england, sign of the hammer, fighting the world, kings of metal, the triumph of steel, louder than hell, warriors of the world, gods of war, joey demaio, karl logan, eric adams, scott columbus, rhino, donny hamzik, david shankle"> <meta HTTP-EQUIV="Content-Language" content="FI"> <link href="http://www.manowarfinland.com/tyylit2.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /> <script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script> <script type="text/javascript" src="js/lightbox.js"></script> <title>Manowar Finland - Suomalainen Manowar fanisivusto</title> </head> <body> <div id="a1"></div> <div class="a2"><span class="valikko"> <a href="http://www.manowarfinland.com/">Etusivu</a> <a href="/mfbb">Foorumi</a> <a href="/uutiset.php">Uutiset</a> <a href="/bandi.php">Bändi</a> <a href="/kiertue.php">Kiertue</a> <a href="/kuvat.php">Kuvat</a> <a href="/linkit.php">Linkit</a> <a href="/tekijat.php">Tekijät</a> </span></div> <div class="a3"> PHP: Pages are from the <div class="a2">, bandi.php, kuvat.php, tekijat.php etc etc. Thanks!