Jump to content

php include() help


Skipjackrick

Recommended Posts

I have a menu in my website that repeats for every single page.  Sometimes I need to update or change this menu.  Well, updating 50 pages with the exact same information is quite rediculous and I found out that you can use include to reference one menu file that would be included in every file.  YAY!

 

Anyways,

 

I can't seem to get it to work. 

 

Wouldn't I just echo back the html??  I continue getting a parse error on this code I am trying to include.  Is their another way to write html in php?  Tutorial somewhere?

 

In every page I have

 

include 'menu.php';

 

 

menu.php

<?php
echo "<!-- wrap starts here -->";
echo "<div id="wrap">";
echo "<!--header -->";
echo "<div id="header">";		
echo "<h1 id="logo-text"></h1>";		
echo "<p id="slogan"></p>";	
echo "<div id="header-links">";
echo "<p>";
echo "</p>";		
echo "</div>";		
echo "</div>";
echo "<!-- menu -->";
echo "<div  id="menu">";
echo "<ul id="MenuBar1" class="MenuBarHorizontal">";
echo "<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/index.php">Main </a>";
echo "<ul>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/index.php">Kayak Wars</a></li>";
echo "<li><a href="http://www.extremecoast.com/index.htm">Extremecoast</a></li>";
echo "</ul>";
echo "</li>";
echo "<li><a href="http://www.extremecoast.com/phpBB3/index.php">Forum</a></li>";
echo "<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/standings.php">Standings</a>";
echo "<ul>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/standings.php">Team Standings</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/anglerstandings.php">Angler Standings</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/alltime.php">All Time Records</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/standings07.html">2007 Standings</a></li>";
echo "</ul>";
echo "</li>";
echo "<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/submission.php">Info</a>";
echo "<ul>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/submission.php">Make a Submission</a></li>";
echo "<li><a href="http://extremecoast.com/phpBB3/viewtopic.php?f=5&t=10813">Sign Up a Team</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/points.html">Point Distribution</a></li>";
echo "</ul>";
echo "</li>";
echo "<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/teams.php">Teams</a>";
echo "<ul>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Rockstar/uploaded_files/teampage.php">Rockstar</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Plastic%20Pirates/uploaded_files/teampage.php">Plastic Pirates</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Lone%20Star%20Sharkers/uploaded_files/teampage.php">Lone Star Sharkers</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Roadrunner/uploaded_files/teampage.php">Roadrunner</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Hawg%20Wild/uploaded_files/teampage.php">Hawg Wild</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Mojo/uploaded_files/teampage.php">Mojo</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/TAMUK%20Anglers/uploaded_files/teampage.php">TAMUK Anglers</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Krakatoa/uploaded_files/teampage.php">Krakatoa</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Why knot/uploaded_files/teampage.php">Why Knot</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Kraken/uploaded_files/teampage.php">Kraken</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Blue%20Desert/uploaded_files/teampage.php">Blue Desert</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Red%20Tide/uploaded_files/teampage.php">Red Tide</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/High%20Hopes/uploaded_files/teampage.php">High Hopes</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Academy/uploaded_files/teampage.php">Academy</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Wade%20Extreme%20Texas/uploaded_files/teampage.php">Wade Extreme Texas</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Islanders/uploaded_files/teampage.php">Islanders</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/SouthWest%20Paddle%20Sports/uploaded_files/teampage.php">SouthWest Paddle Sports</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Lucky%2013/uploaded_files/teampage.php">Lucky 13</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/King%20Mack%20Smack/uploaded_files/teampage.php">King Mack Smack</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Dollar%20Yo/uploaded_files/teampage.php">Dollar Yo</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Island%20Pride/uploaded_files/teampage.php">Island Pride</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Yak%20Bums/uploaded_files/teampage.php">Yak Bums</a></li>";
echo "<li><a href="http://www.extremecoast.com/Kayak_Wars/Big%20Jig/uploaded_files/teampage.php">Big Jig</a></li>";
echo "</ul>";
echo "</li>";
echo "<li class="last"><a href="http://www.extremecoast.com/Kayak_Wars/rules.html">Rules</a></li>";
echo "</ul>";
echo "</div>";		
echo "<!-- content-wrap starts here -->";
?>

Link to comment
Share on other sites

Here is how it should be done:

<?php
echo '<!-- wrap starts here -->
<div id="wrap">
<!--header -->
<div id="header">
<h1 id="logo-text"></h1>
<p id="slogan"></p>
<div id="header-links">
<p>
</p>
</div>
</div>
<!-- menu -->
<div  id="menu">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/index.php">Main </a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/index.php">Kayak Wars</a></li>
<li><a href="http://www.extremecoast.com/index.htm">Extremecoast</a></li>
</ul>
</li>
<li><a href="http://www.extremecoast.com/phpBB3/index.php">Forum</a></li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/standings.php">Standings</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/standings.php">Team Standings</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/anglerstandings.php">Angler Standings</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/alltime.php">All Time Records</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/standings07.html">2007 Standings</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/submission.php">Info</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/submission.php">Make a Submission</a></li>
<li><a href="http://extremecoast.com/phpBB3/viewtopic.php?f=5&t=10813">Sign Up a Team</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/points.html">Point Distribution</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/teams.php">Teams</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Rockstar/uploaded_files/teampage.php">Rockstar</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Plastic%20Pirates/uploaded_files/teampage.php">Plastic Pirates</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Lone%20Star%20Sharkers/uploaded_files/teampage.php">Lone Star Sharkers</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Roadrunner/uploaded_files/teampage.php">Roadrunner</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Hawg%20Wild/uploaded_files/teampage.php">Hawg Wild</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Mojo/uploaded_files/teampage.php">Mojo</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/TAMUK%20Anglers/uploaded_files/teampage.php">TAMUK Anglers</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Krakatoa/uploaded_files/teampage.php">Krakatoa</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Why knot/uploaded_files/teampage.php">Why Knot</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Kraken/uploaded_files/teampage.php">Kraken</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Blue%20Desert/uploaded_files/teampage.php">Blue Desert</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Red%20Tide/uploaded_files/teampage.php">Red Tide</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/High%20Hopes/uploaded_files/teampage.php">High Hopes</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Academy/uploaded_files/teampage.php">Academy</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Wade%20Extreme%20Texas/uploaded_files/teampage.php">Wade Extreme Texas</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Islanders/uploaded_files/teampage.php">Islanders</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/SouthWest%20Paddle%20Sports/uploaded_files/teampage.php">SouthWest Paddle Sports</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Lucky%2013/uploaded_files/teampage.php">Lucky 13</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/King%20Mack%20Smack/uploaded_files/teampage.php">King Mack Smack</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Dollar%20Yo/uploaded_files/teampage.php">Dollar Yo</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Island%20Pride/uploaded_files/teampage.php">Island Pride</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Yak%20Bums/uploaded_files/teampage.php">Yak Bums</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Big%20Jig/uploaded_files/teampage.php">Big Jig</a></li>
</ul>
</li>
<li class="last"><a href="http://www.extremecoast.com/Kayak_Wars/rules.html">Rules</a></li>
</ul>
</div>
<!-- content-wrap starts here -->';
?>

or:

<?php
//more php code
?>
<!-- wrap starts here -->
<div id="wrap">
<!--header -->
<div id="header">
<h1 id="logo-text"></h1>
<p id="slogan"></p>
<div id="header-links">
<p>
</p>
</div>
</div>
<!-- menu -->
<div  id="menu">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/index.php">Main </a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/index.php">Kayak Wars</a></li>
<li><a href="http://www.extremecoast.com/index.htm">Extremecoast</a></li>
</ul>
</li>
<li><a href="http://www.extremecoast.com/phpBB3/index.php">Forum</a></li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/standings.php">Standings</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/standings.php">Team Standings</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/anglerstandings.php">Angler Standings</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/alltime.php">All Time Records</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/standings07.html">2007 Standings</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/submission.php">Info</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/submission.php">Make a Submission</a></li>
<li><a href="http://extremecoast.com/phpBB3/viewtopic.php?f=5&t=10813">Sign Up a Team</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/points.html">Point Distribution</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/teams.php">Teams</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Rockstar/uploaded_files/teampage.php">Rockstar</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Plastic%20Pirates/uploaded_files/teampage.php">Plastic Pirates</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Lone%20Star%20Sharkers/uploaded_files/teampage.php">Lone Star Sharkers</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Roadrunner/uploaded_files/teampage.php">Roadrunner</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Hawg%20Wild/uploaded_files/teampage.php">Hawg Wild</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Mojo/uploaded_files/teampage.php">Mojo</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/TAMUK%20Anglers/uploaded_files/teampage.php">TAMUK Anglers</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Krakatoa/uploaded_files/teampage.php">Krakatoa</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Why knot/uploaded_files/teampage.php">Why Knot</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Kraken/uploaded_files/teampage.php">Kraken</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Blue%20Desert/uploaded_files/teampage.php">Blue Desert</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Red%20Tide/uploaded_files/teampage.php">Red Tide</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/High%20Hopes/uploaded_files/teampage.php">High Hopes</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Academy/uploaded_files/teampage.php">Academy</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Wade%20Extreme%20Texas/uploaded_files/teampage.php">Wade Extreme Texas</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Islanders/uploaded_files/teampage.php">Islanders</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/SouthWest%20Paddle%20Sports/uploaded_files/teampage.php">SouthWest Paddle Sports</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Lucky%2013/uploaded_files/teampage.php">Lucky 13</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/King%20Mack%20Smack/uploaded_files/teampage.php">King Mack Smack</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Dollar%20Yo/uploaded_files/teampage.php">Dollar Yo</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Island%20Pride/uploaded_files/teampage.php">Island Pride</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Yak%20Bums/uploaded_files/teampage.php">Yak Bums</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Big%20Jig/uploaded_files/teampage.php">Big Jig</a></li>
</ul>
</li>
<li class="last"><a href="http://www.extremecoast.com/Kayak_Wars/rules.html">Rules</a></li>
</ul>
</div>
<!-- content-wrap starts here -->';
<?php
//more php code
?>

or:

<?php
echo "<!-- wrap starts here -->
<div id=\"wrap\">
<!--header -->
<div id=\"header\">
<h1 id=\"logo-text\"></h1>
<p id=\"slogan\"></p>
<div id=\"header-links\">
<p>
</p>
</div>
</div>
<!-- menu -->
<div  id=\"menu\">
<ul id=\"MenuBar1\" class=\"MenuBarHorizontal\">
<li><a class=\"MenuBarItemSubmenu\" href=\"http://www.extremecoast.com/Kayak_Wars/index.php\">Main </a>
<ul>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/index.php\">Kayak Wars</a></li>
<li><a href=\"http://www.extremecoast.com/index.htm\">Extremecoast</a></li>
</ul>
</li>
<li><a href=\"http://www.extremecoast.com/phpBB3/index.php\">Forum</a></li>
<li><a class=\"MenuBarItemSubmenu\" href=\"http://www.extremecoast.com/Kayak_Wars/standings.php\">Standings</a>
<ul>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/standings.php\">Team Standings</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/anglerstandings.php\">Angler Standings</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/alltime.php\">All Time Records</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/standings07.html\">2007 Standings</a></li>
</ul>
</li>
<li><a class=\"MenuBarItemSubmenu\" href=\"http://www.extremecoast.com/Kayak_Wars/submission.php\">Info</a>
<ul>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/submission.php\">Make a Submission</a></li>
<li><a href=\"http://extremecoast.com/phpBB3/viewtopic.php?f=5&t=10813\">Sign Up a Team</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/points.html\">Point Distribution</a></li>
</ul>
</li>
<li><a class=\"MenuBarItemSubmenu\" href=\"http://www.extremecoast.com/Kayak_Wars/teams.php\">Teams</a>
<ul>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Rockstar/uploaded_files/teampage.php\">Rockstar</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Plastic%20Pirates/uploaded_files/teampage.php\">Plastic Pirates</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Lone%20Star%20Sharkers/uploaded_files/teampage.php\">Lone Star Sharkers</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Roadrunner/uploaded_files/teampage.php\">Roadrunner</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Hawg%20Wild/uploaded_files/teampage.php\">Hawg Wild</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Mojo/uploaded_files/teampage.php\">Mojo</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/TAMUK%20Anglers/uploaded_files/teampage.php\">TAMUK Anglers</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Krakatoa/uploaded_files/teampage.php\">Krakatoa</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Why knot/uploaded_files/teampage.php\">Why Knot</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Kraken/uploaded_files/teampage.php\">Kraken</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Blue%20Desert/uploaded_files/teampage.php\">Blue Desert</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Red%20Tide/uploaded_files/teampage.php\">Red Tide</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/High%20Hopes/uploaded_files/teampage.php\">High Hopes</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Academy/uploaded_files/teampage.php\">Academy</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Wade%20Extreme%20Texas/uploaded_files/teampage.php\">Wade Extreme Texas</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Islanders/uploaded_files/teampage.php\">Islanders</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/SouthWest%20Paddle%20Sports/uploaded_files/teampage.php\">SouthWest Paddle Sports</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Lucky%2013/uploaded_files/teampage.php\">Lucky 13</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/King%20Mack%20Smack/uploaded_files/teampage.php\">King Mack Smack</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Dollar%20Yo/uploaded_files/teampage.php\">Dollar Yo</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Island%20Pride/uploaded_files/teampage.php\">Island Pride</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Yak%20Bums/uploaded_files/teampage.php\">Yak Bums</a></li>
<li><a href=\"http://www.extremecoast.com/Kayak_Wars/Big%20Jig/uploaded_files/teampage.php\">Big Jig</a></li>
</ul>
</li>
<li class=\"last\"><a href=\"http://www.extremecoast.com/Kayak_Wars/rules.html\">Rules</a></li>
</ul>
</div>
<!-- content-wrap starts here -->";
?>

Take your pick.

Link to comment
Share on other sites

If you're using double quotes, you can't do this...

 

<?php

  echo"This is not "correct" when you have double quotes";

?>

 

This is the correct way to do it...

 

<?php

  echo"This is not \"correct\" when you have double quotes";
  //You need to escape double quotes - Same rule applies when using single quotes

?>

Link to comment
Share on other sites

papaface is correct. No need to use one million echos. You can use one echo and come in and out of quotes if you use variables.

 

<?php

  echo'
  <div id="test">
    <span>Hello world. My name is '.$name.'</span>
  </div>';

?>

Link to comment
Share on other sites

Whoa!  Thanks!

 

But I get this error?

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/extremf3/public_html/Kayak_Wars/Dollar Yo/uploaded_files/menu.php on line 2

 

Parse error: syntax error, unexpected T_STRING in /home/extremf3/public_html/Kayak_Wars/Dollar Yo/uploaded_files/menu.php on line 2

 

 

Line 2 is just

 

echo '<!-- wrap starts here -->

Link to comment
Share on other sites

just because you are including a php file you don't have to have everything in php tags. You can just put all your html code outside the tags

 

<?php
// some php code for variables below

?>
<!-- wrap starts here -->
<div id="wrap">
<!--header -->
<div id="header">
<h1 id="logo-text"></h1>
<p id="slogan"></p>
<div id="header-links">
<p>
</p>
</div>
</div>
<!-- menu -->
<div  id="menu">
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/index.php">Main </a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/index.php">Kayak Wars</a></li>
<li><a href="http://www.extremecoast.com/index.htm">Extremecoast</a></li>
</ul>
</li>
<li><a href="http://www.extremecoast.com/phpBB3/index.php">Forum</a></li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/standings.php">Standings</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/standings.php">Team Standings</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/anglerstandings.php">Angler Standings</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/alltime.php">All Time Records</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/standings07.html">2007 Standings</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/submission.php">Info</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/submission.php">Make a Submission</a></li>
<li><a href="http://extremecoast.com/phpBB3/viewtopic.php?f=5&t=10813">Sign Up a Team</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/points.html">Point Distribution</a></li>
</ul>
</li>
<li><a class="MenuBarItemSubmenu" href="http://www.extremecoast.com/Kayak_Wars/teams.php">Teams</a>
<ul>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Rockstar/uploaded_files/teampage.php">Rockstar</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Plastic%20Pirates/uploaded_files/teampage.php">Plastic Pirates</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Lone%20Star%20Sharkers/uploaded_files/teampage.php">Lone Star Sharkers</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Roadrunner/uploaded_files/teampage.php">Roadrunner</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Hawg%20Wild/uploaded_files/teampage.php">Hawg Wild</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Mojo/uploaded_files/teampage.php">Mojo</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/TAMUK%20Anglers/uploaded_files/teampage.php">TAMUK Anglers</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Krakatoa/uploaded_files/teampage.php">Krakatoa</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Why knot/uploaded_files/teampage.php">Why Knot</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Kraken/uploaded_files/teampage.php">Kraken</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Blue%20Desert/uploaded_files/teampage.php">Blue Desert</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Red%20Tide/uploaded_files/teampage.php">Red Tide</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/High%20Hopes/uploaded_files/teampage.php">High Hopes</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Academy/uploaded_files/teampage.php">Academy</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Wade%20Extreme%20Texas/uploaded_files/teampage.php">Wade Extreme Texas</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Islanders/uploaded_files/teampage.php">Islanders</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/SouthWest%20Paddle%20Sports/uploaded_files/teampage.php">SouthWest Paddle Sports</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Lucky%2013/uploaded_files/teampage.php">Lucky 13</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/King%20Mack%20Smack/uploaded_files/teampage.php">King Mack Smack</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Dollar%20Yo/uploaded_files/teampage.php">Dollar Yo</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Island%20Pride/uploaded_files/teampage.php">Island Pride</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Yak%20Bums/uploaded_files/teampage.php">Yak Bums</a></li>
<li><a href="http://www.extremecoast.com/Kayak_Wars/Big%20Jig/uploaded_files/teampage.php">Big Jig</a></li>
</ul>
</li>
<li class="last"><a href="http://www.extremecoast.com/Kayak_Wars/rules.html">Rules</a></li>
</ul>
</div>
<!-- content-wrap starts here -->

 

Why go nuts with all the quotes

 

Ray

Link to comment
Share on other sites

Whoa!  Thanks!

 

But I get this error?

 

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/extremf3/public_html/Kayak_Wars/Dollar Yo/uploaded_files/menu.php on line 2

 

Parse error: syntax error, unexpected T_STRING in /home/extremf3/public_html/Kayak_Wars/Dollar Yo/uploaded_files/menu.php on line 2

 

 

Line 2 is just

 

echo '<!-- wrap starts here -->

What code did you try. You mustn't have copied it correctly.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.