Header and footer codes?

kiko_friendly

New Member
It's PHP, right? :eek: :(

Anyone know where I can get a good header and footer code?

I want to rid myself of frames, and I don't want to update EVERY page of my site each time I make one update!
 

zkiller

Super Moderator
Staff member
just use server side includes. this would allow you to insert tid bits of code, such as a header or footer, into your page, that are stored within separate files, thus making updates very simple.

the standard html code for this is...

Code:
<!--#include file="filename.htm" -->
when used in conjunction with php, the code is slightly different. but, unfortunately i never took the time to learn php and as in such don't recall what it was. hope that helps a little though.
 

kiko_friendly

New Member
Oh and I don't know PHP, so if you know of a PHP header, I'd love to know - but I wont understand unless you just basically tell me copy and paste codes!
 

zkiller

Super Moderator
Staff member
that won't tell me whether your includes are working or not though. much like server side scripting languages, the browser will only show pure html.

also, i get redirected to a error page when i click on the first link.

your code should look something like this in the index.shtm

Code:
<html>
<head>
<title>title goes here</title>
</head>

<body>
<!--#include file="header.htm" -->

<table>
   <tr>
      <td><!--#include file="menu.htm" --></td>
      <td>Your content would go here</td>
   </tr>
</table>

<!--#include file="footer.htm" -->
</body>
</html>
the file extension of your includes can be whatever you like. i like to create a separate folder for them and give them a file extension of .inc
 

kiko_friendly

New Member
I tried the files with top.htm and bottom.html, too. That didn't work, either. That's why I changed it to .inc (which wont work either).
 
Top