Simple Navigation PHP issue - please help!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
CLTaylor5
Forum Newbie
Posts: 5
Joined: Tue Feb 12, 2008 1:36 pm

Simple Navigation PHP issue - please help!

Post by CLTaylor5 »

I want to use a simple php script for my navigation bar.

I have tried this and it doesn't work before <html>

<?php include("navigation.php"); ?>

Do I need to add <div id="navigation"> before it?

Can someone please give me the exact script and tell me where to put I?

Thanks - PS I'm using Frontpage Expressions Web
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Simple Navigation PHP issue - please help!

Post by Christopher »

That syntax looks correct. Is the file containing that code named with a .php extension? If it has a .html extension then PHP will not parse it.
(#10850)
CLTaylor5
Forum Newbie
Posts: 5
Joined: Tue Feb 12, 2008 1:36 pm

Re: Simple Navigation PHP issue - please help!

Post by CLTaylor5 »

Thanks for responding Christopher.

I forgot to say that yeah the file is saved as navigation.php and contains all of the html code. I just leave in the main directory vs. a subfolder.

Maybe its the placement of the code. I have placed it within the nav bar design.

Any ideas are appreciated.
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Re: Simple Navigation PHP issue - please help!

Post by liljester »

can you post a little more of your code?
CLTaylor5
Forum Newbie
Posts: 5
Joined: Tue Feb 12, 2008 1:36 pm

Re: Simple Navigation PHP issue - please help!

Post by CLTaylor5 »

Yes, thanks for helping. I've tried several ways, but here's the current code:

<div align="center"><center><table border="0" cellpadding="0" cellspacing="0" width="765" height="138"><tr><td width="180" bgcolor="#B2B2C5" height="138"><table border="0" cellpadding="0" cellspacing="0" width="180" height="138" bgcolor="#B2B2C5" style="border-collapse: collapse" bordercolor="#111111"><tr><td align="center">
<font face="Curlz MT" size="6" color="#FFFFFF"><strong><dfn>Everything </dfn></strong></font><p><font face="Curlz MT" size="6" color="#FFFFFF"><strong><dfn>Menopause</dfn></strong></font></td></tr></table></td><td width="1" bgcolor="#663366"><img border="0" src="images/space.gif" width="1" height="1"></td><td height="22" width="120"><img border="0" src="images/H0881T_2.jpg" width="583" height="141" alt="Menopause | Menopause Symptom"></td></tr></table></center></div><div align="center"><center><table border="0" cellpadding="0" cellspacing="0" width="765" height="24"><tr><td width="180" background="images/left.gif">&nbsp;</td></tr></table></center></div><center>
<table border="0" cellpadding="0" cellspacing="0" width="765" style="height: 2207px"><tr><td width="180" bgcolor="#EAEAEA" valign="top"><table class="left" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#BBCEBB"><tr><td width="100%"><div align="center"><center>&nbsp;<table class="newsbox1" border="0" cellpadding="0" cellspacing="0" width="156" id="table1"><tr><td class="leftlinks" width="100%">

<?php include("navigation.php"); ?>

</td></tr></table><p>
&nbsp;</p></center></div></td></tr></table><div align="center">&nbsp;<br><table border="0" cellpadding="0" cellspacing="0" id="table1" width="179"><tr><td width="83%"><p align="center"><font color="#003366" face="Verdana" size="1"><b>Sign up for Our Newsletter<br>Here and Receive Personal<br>Stories Every Month<br>(Your information is kept <br>strictly confidential)</b></font></p>
Last edited by CLTaylor5 on Thu Feb 14, 2008 11:26 am, edited 2 times in total.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Simple Navigation PHP issue - please help!

Post by Christopher »

Are any PHP pages parsed on your site? Is it configured properly?
(#10850)
CLTaylor5
Forum Newbie
Posts: 5
Joined: Tue Feb 12, 2008 1:36 pm

Re: Simple Navigation PHP issue - please help!

Post by CLTaylor5 »

Sorry, I'm not a coder so I do not know what parsed means, and I think it's configured but can't be sure.
Post Reply