Page 1 of 1

Newbie needs help

Posted: Thu Dec 04, 2003 3:20 pm
by jp_css
How would I write a simple php instruction to place some html code on a page. In other words, I have created a header and a footer and want to be able to place these html files on the page and have different code in between depending on the page. I have done some mySQL work already, but even a simple process like this I don't know how to do.

Posted: Thu Dec 04, 2003 3:39 pm
by uberpolak
If your header file is called "header.php" and is in the same directory as the page it's being included from, use this command:

Code: Select all

<?php
include('header.php');
?>
You would do well to read a tutorial on PHP before you get into much heavier work.

Try http://www.php.net/tut.php