I'm willing to bet that this will work on another server. I'm beginning to suspect that php was compiled strangely on the server I'm using.
I hope this displays right...
A modified version of this (with the variables redeclared in the second file) is at http://www.skygods.org/updates.php, if you want to see the output.
Theo.
This is the file being included:
<?
echo "\n<head>\n<title> ";
echo "$title";
echo " </title>\n\n";
echo "<meta name=\"Author\" content=\"Theo Rhodes\">\n";
// add switch loop to determine keywords and description
echo "<meta name=\"Keywords\" content=\"\">\n";
echo "<meta name=\"Description\" content=\"\">\n\n";
echo "<link rel=stylesheet type=\"text/css\" href=\"base.css\">\n\n";
echo "</head>\n\n";
echo "<body bgcolor=\"#000000\" text=\"#fefefe\" background=\"graphics/bgtestneg.jpg\">\n";
echo "<center>\n\n";
// declare some formatting variables
$newTextBox = "<table width=\"100%\" cellpadding=\"0\">\n<tr>\n<td bgcolor=\"#808080\">\n<table width=\"100%\" cellpadding=\"14\">\n<tr>\n<td bgcolor=\"#000000\">\n";
$endTextBox = "\n</td>\n</tr>\n</table>\n</td>\n</tr>\n</table>\n";
?>
This is an example of a file in which the above is included:
<?
require("http://www.skygods.org/header.php");
echo "$newTextBox";
?>
<table align="center">
<tr>
<td width="25%" align="left"><img src="graphics/pblogots.jpg"></td>
<td width="10%"> </td>
<td width="30%" align="center"><img src="graphics/footer.jpg">
<p class="title">[updates]</p></td>
<td width="10%"> </td>
<td width="25%" align="right"><img src="graphics/pblogots.jpg"></td>
</tr>
</table>
<? echo "$endTextBox"; ?>
<table align="center"><tr>
<td width="10%" valign="top">
<? echo "$newTextBox"; ?>
<p class="head">[old updates]</p>
<p class="text"><a href="old/updates.html" class="menu">pre october 2001</p>
<? echo "$endTextBox"; ?>
</td>
<td width="90%">
<? echo "$newTextBox"; ?>
<p class="text">10.20.2001<br>Added updates section to new site. Old site can still be found at <a href="http://www.skygods.org/old/" class="inline">http://www.skygods.org/old/</a></p>
<? echo "$endTextBox"; ?>
</td></tr></table>
<?
require("http://www.skygods.org/footer.php");
?>