DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   HTML and CSS (http://www.daniweb.com/forums/forum143.html)
-   -   Including header file using HTML (http://www.daniweb.com/forums/thread65257.html)

fivepointer Dec 18th, 2006 1:15 pm
Including header file using HTML
 
Is it possible to include a header and footer file using HTML? I have my file as a .html and need to be able to include the HTML for the header and footer. Anyone know how I can do this?

stymiee Dec 18th, 2006 1:48 pm
Re: Including header file using HTML
 
You need to use a server-side language for this as HTML is static and cannot perform dynamic actions.

roryt Dec 18th, 2006 2:49 pm
Re: Including header file using HTML
 
All you need to do is save you page as "mypage.php" and put this piece of code in for your header and footer:
[php]<?php

include ("includes/header.php");

?>[/php]

Hope this helps


All times are GMT -4. The time now is 6:28 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC