Amezis 0 Report post Posted August 19, 2005 Let's say I have the same PHP script on all pages, with the same menus, footer etc, but with different content. The PHP page is called "Sitename - ", and the included pages (which is in HTML) is called "Thingy". I want it to load both titles, so the title will be "Sitename - Thingy". The second page have the same PHP code (with the normal title, "Sitename - "), but is called "Why not?". This one have the title "Sitename - Why not?".Hope you understand what I want, and that you can help me. Share this post Link to post Share on other sites
electriic ink 1 Report post Posted August 19, 2005 (edited) So you have a header file containing all of the content between the <head> </head> tags but you want to make it so that you can still include the file but have different content between the <title></title> tags? If I am right, this is how I would do it, but it requires php: Your header.php file <html> <head> <title> Sitename - <? echo $pagetitle; ?> </title> </head> <!-- Some over stuff --> An example webpage <? $pagetitle = "Black Widgets"; include "header.php";/* Some other stuff */?> Now between the <title> tags on our webpage there is Sitename - Black Widgets. I use the same idea on my website Edit: Mistyped some code Edited August 19, 2005 by cmatcmextra (see edit history) Share this post Link to post Share on other sites
HmmZ 0 Report post Posted August 19, 2005 Great to see other people who know enough about php too (it may be bad for my hosting credits tho , gained alot by answering php qustions ) Share this post Link to post Share on other sites