Newbie needs help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jp_css
Forum Newbie
Posts: 23
Joined: Thu Dec 04, 2003 3:20 pm

Newbie needs help

Post 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.
User avatar
uberpolak
Forum Contributor
Posts: 261
Joined: Thu Jan 02, 2003 10:37 am
Location: Next to the bar

Post 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
Post Reply