Jim,
Script is an understatement - you need a small system to do that. I can give you a simple idea.
Let's say -> your page would look something like this
| Logo here |
|Menu|Content goes here|
| | |
| | |
| | |
For simiplicity's sake we'll assume that logo and menu portions of page will remain constant, but Content portion will change. So the question is how to change content based on user clicks while preserving the same layout?
Well, you write a function that will hold logo and menu stationary, while displaying the content.
This is short implementation
function template($content)
{
echo "
<TABLE BORDER=1 WIDTH=100%>
<TR><TD COLSPAN=2><IMG SRC=/my_logo.jpg ALIGN=RIGHT></TD></TR>
<TR>
<TD WIDTH=15%>Here goes your menu</TD>
<TD WIDTH=100%><B>$content</B></TD>
</TR>
</TABLE>";
}
<B>$content</B> is something that you pass to the function and it can be anything.
Let's say file.txt has
"<H3>Hi there</H3>";
And if you want to pass contents of file.txt to your template function you just
$fp=fopen("file.txt", "r");
$file_contents=fread($fp, filesize("file.txt"));
fclose($fp);
Then you call your template and pass info to it
template($file_contents);
Of course you can go into more depth, and write more versatile template functions that change logos, and rows to the general layout table, change menus. You can write templates that instead of passing contents to it - you can just pass file name and template function will open, read data out, and close the file... ideas can be numerous... Your template functions should be the outcome of the general design of your site and methodologies you use to implement it.
Hope that helps,
Di