PHP Template Integration

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
kate_sfd
Forum Newbie
Posts: 2
Joined: Sun Mar 29, 2009 5:14 pm

PHP Template Integration

Post by kate_sfd »

I coded my template into sections, and the "content.html" will change according to what menu link is clicked. How do I code that line of PHP in this main template to show that new content will be inserted? for example about.html, contact.html etc..

Code: Select all

<html>
<body>
<?php include ("header.html") ?>
<?php include ("content.html") ?>
<?php include ("footer.html") ?>
</body>
</html>
User avatar
phpbaby2009
Forum Commoner
Posts: 31
Joined: Sun Nov 16, 2008 8:20 pm

Re: PHP Template Integration

Post by phpbaby2009 »

kate_sfd wrote:I coded my template into sections, and the "content.html" will change according to what menu link is clicked. How do I code that line of PHP in this main template to show that new content will be inserted? for example about.html, contact.html etc..

Code: Select all

<html>
<body>
<?php include ("header.html") ?>
<?php include ("content.html") ?>
<?php include ("footer.html") ?>
</body>
</html>
What do you mean by new content ?

What is inside your content.html ?

I will share what I know. Thanks.
kate_sfd
Forum Newbie
Posts: 2
Joined: Sun Mar 29, 2009 5:14 pm

Re: PHP Template Integration

Post by kate_sfd »

All that's in the "content.html" is just a div with text in it

Code: Select all

<div><p> just text</p></div>
Post Reply