Jump to content

[SPLIT FROM]: What is the correct way to use includes


bsilverman

Recommended Posts

This sounds like what i want to do. I am using includes for header, footer, and contents which go into a table to keep them organized and a standard look. I can put it all together well, except i dont know how to change the contents.php. I could eventually have hundreds of content pages.  Right now i just have one and named it contents.php. So if i add another and called it contents2.php for example, how do i call it or replace the original contents.php. If i used a plain page i could just link to the next page but i dont want to do that.

So you have a table, which has all the content/html that you want on each page? Like search.php has a row in a table and when someone goes to index.php?location=search.php, it access that row and spits out the corresponding html? I can't imagine that being anymore useful or efficient than just creating a separate page for each php file. I just have a bunch of php files with my config/header/footer files in include() functions in all of them.

No, no the table is used only to hold the header, footer and menu in there correct place. I simple need to know how to call the new contents pages each time the user clickes either a next/previous link or something like that.  Are you suggesting that each content page call the includes and create a whole new page each time called?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.