View Full Version : question about web page programming?
wilbasket168
08-15-2003, 12:21 AM
hello, recently i created a web site. there are some questions come across my mind. is there a way that i can program a web page where each page will have idential header footer and menu only the content will change from page to page. is there a way to do it. i realize that if i code html tag into every page will be hassle if later on i want to change something then i have to change every page. is there a faster way to do it. thank you
sweenster
08-15-2003, 12:34 AM
if you are using PHP you can make use of the include() function:
<?
include('menu.php');
?>
create a file called "menu.php" with the code for your menu, and "footer.php" for your footer and call them with the above code.
OR
do the opposite and design one main page into which the specific sub-page is inserted
<?
include(''.$load.'.php');
?>
and call the page thus:
index.php?load=page1
cg9com
08-15-2003, 08:51 PM
Also making good use of CSS.
That can cover all presentational stuff.
You can store different layouts in different css files if you really wanted to.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.