0

Hi everyone I am new here. It has been a few years since I have done any php coding and need help.

My website is basically static and constant throughout the entire site except for the main content on the page. I know there is some way to use the PHP INCLUDES function so that when you click a link it will change the main content but not the whole page.

I found a thread on here of someone doing it but it does not explain how to use it.

http://www.daniweb.com/forums/thread12335.html

If someone could please explain how to do this or send me somewhere that already explains it that would be much appreciated.

Thanks
Adam

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by chrishea
0

If you have a program that is working then imagine taking a section of that code, copying and removing it then being able to plug it back in from somewhere else. That is essentially what an Include / Require does. There are a variety of things that you can do with an Include. If you have parameters that are global to a system and you want to have available in every program, then you put them into a config module and include it everywhere. If you have headers and footers and other format bits that you want to include on every page, then you can use it for that as well. It is this latter usage that you are looking at.

This article may be useful as a starting point:
http://blog.themeforest.net/tutorials/simple-layouts-with-php/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.