i have it inserted in <?php ?> tags. the function runs in body.php but not in nav.php but i've changed it to .php now.
it maybe a sloppy way to code, i'm just beginning my coding experince with php :-/
if you want i can post each page of code so you can get a good idea, if that is what your asking for.
index.php
PHP Code:
<?php
include ("header.php");
include ("articles/top.php");
include ("articles/body.php");
include ("footer.php");
?>
nav.php
PHP Code:
<TD COLSPAN=12>
<IMG SRC="images/layout_02.gif" WIDTH=605 HEIGHT=12 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=3>
<IMG SRC="images/layout_03.gif" WIDTH=48 HEIGHT=23 ALT=""></TD>
<TD>
<IMG SRC="images/layout_04.gif" WIDTH=165 HEIGHT=23 ALT=""></TD>
<TD>
<IMG SRC="images/layout_05.gif" WIDTH=12 HEIGHT=23 ALT=""></TD>
<TD COLSPAN=3>
<IMG SRC="images/layout_06.gif" WIDTH=117 HEIGHT=23 ALT=""></TD>
<TD COLSPAN=4>
<IMG SRC="images/layout_07.gif" WIDTH=263 HEIGHT=23 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=3>
<IMG SRC="images/layout_08.gif" WIDTH=48 HEIGHT=48 ALT=""></TD>
<TD COLSPAN=4>
<IMG SRC="images/layout_09.gif" WIDTH=283 HEIGHT=48 ALT=""></TD>
<TD COLSPAN=2>
<IMG SRC="images/layout_10.gif" WIDTH=177 HEIGHT=48 ALT=""></TD>
<TD COLSPAN=3>
<IMG SRC="images/layout_11.gif" WIDTH=97 HEIGHT=48 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=2>
<IMG SRC="images/layout_12.gif" WIDTH=36 HEIGHT=47 ALT=""></TD>
<TD COLSPAN=4 align=left>
<?php echo pagetitle(); ?></td>
<td colspan=4 align=right>Table Row 2</td>
<TD COLSPAN=2>
<IMG SRC="images/layout_14.gif" WIDTH=86 HEIGHT=47 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=12>
<IMG SRC="images/layout_15.gif" WIDTH=605 HEIGHT=23 ALT=""></TD></TR><tr>
body.php
PHP Code:
<td colspan=3 background="images/layout_16.gif">
<img src="images/layout_16.gif" width=48 height=12 alt="">
</td>
<td name=body colspan=7 rowspan=2 bgcolor="#0000FF" valign="top" style="padding-left: 4; padding-right: 4; padding-top: 4; padding-bottom: 4">
<?php
if (!$_GET['article'])
{
include ('article/home.php');
}
else
{
$pagetitle=$_GET['article'];
switch($pagetitle)
{
case "home":
include ('article/home.php');
break;
case "theaccident":
include ('article/theaccident.php');
break;
default: }
}
?>
</td>
<TD COLSPAN=2 background="images/layout_18.gif">
<IMG SRC="images/layout_18.gif" WIDTH=86 HEIGHT=12 ALT=""></TD>
</TR>
<TR>
<TD COLSPAN=3 background="images/layout_19.gif">
<IMG SRC="images/layout_19.gif" WIDTH=48 HEIGHT=236 ALT=""></TD>
article.php
PHP Code:
<?php
$titleofpage = "The Accident";
function pagetitle()
{
global $titleofpage;
echo "Where You're At: <br> <strong>Index > The Guide > ".$titleofpage."</strong>";
}
?>
<p class="MsoNormal" style="text-indent:.5in;line-height:150%">
I think we all have a moment when we see and acknowledge that we are
indeed exposed to the real possibility of something extremely bad
happening to us. That if we don?t start considering the consequences
to our actions, we may regret what happens to us as a ripple affect
from them. For me, It was never like I thought I was immune to the
bad things, I just never thought it would happen to me. It was too
unlikely in my eyes, so when the truck swerved I never could have
guessed what would be coming next. I have always learned best by
experience, and I guess this lesson was no different. </p>
<p class="MsoNormal" style="text-indent:.5in;line-height:150%">It
was Friday, and school had just let out. Instead of taking a ride
from Brain I decided to get a ride from Ben. In the truck there was
Ben, Matt, Chad and me. Ben and Matt were sitting in the front,
while Chad and I sat in the back. We pulled out onto Fifth Street
and I looked out my window. I remember seeing kids and then I felt a
jerk. I slide to the middle of the back seat, and began to look
through the windshield to see what was going on. It had been a van
that pulled out in front of us that had caused Ben to swerve. I
remember thinking to myself; I hope I make it out alright and then
time slowed down dramatically. Looking through the windshield I
could see the kids ahead, and before I had time to think ?what?s
going to happen? I felt it. It felt as if we were hitting trees and
running them over, but instead of trees they were kids. Then I felt
the kids under the truck as it rolled over on them, and I remember
hearing the screams from the people witnessing it. The sound of the
screaming made me think back to Columbine, so when the truck finally
stopped I was terrified of what just happened. I knew it was bad,
if not from what I felt, what I saw but just from what I heard.</p>
<p class="MsoNormal" style="text-indent:.5in;line-height:150%">It
was then I realized how fast things can change, and without your
control. How important it is to understand your actions may affect
someone else and how unfair that might be to them. I?ve learned
that I am mortal, that bad things can happen to me and that I need
to be aware of the dangers and do my best to prevent them.