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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.