tandoc
April 13th, 2002, 06:30
To make my pages seem more organized, i want to make it like http://mysite.com/index.php?page=somepage
but, i also want it to have it's own title.
for example:
in my previous site, i used this code
<?php
if ( $id=='' ) {
$id="/home/a/n/andytandoc/public_html/content/home";
$l="?";
}
else {
$id="$id";
}
?>
<html>
<head>
<title>My site title</title>
</head>
<body>
<?php if (! file_exists("$id.htm"))
{
include("error_page.php");
}
else
{
include("$id.htm");
}
?>
</body>
</html>
the result of that code... gives every page the same title, but i want to know is how to still have that kinda of script, but giving each page it's own title.... like instead of each page being 'My Homepage' i want it like
the downloads page with 'My Homepage - Downloads'
the about me page with 'My Homepage - About Me'
etc etc... do you get what i'm saying?
but, i also want it to have it's own title.
for example:
in my previous site, i used this code
<?php
if ( $id=='' ) {
$id="/home/a/n/andytandoc/public_html/content/home";
$l="?";
}
else {
$id="$id";
}
?>
<html>
<head>
<title>My site title</title>
</head>
<body>
<?php if (! file_exists("$id.htm"))
{
include("error_page.php");
}
else
{
include("$id.htm");
}
?>
</body>
</html>
the result of that code... gives every page the same title, but i want to know is how to still have that kinda of script, but giving each page it's own title.... like instead of each page being 'My Homepage' i want it like
the downloads page with 'My Homepage - Downloads'
the about me page with 'My Homepage - About Me'
etc etc... do you get what i'm saying?