bsilverman Posted March 5, 2012 Share Posted March 5, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/258294-split-from-what-is-the-correct-way-to-use-includes/ Share on other sites More sharing options...
dannyb785 Posted March 5, 2012 Share Posted March 5, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/258294-split-from-what-is-the-correct-way-to-use-includes/#findComment-1323949 Share on other sites More sharing options...
bsilverman Posted March 5, 2012 Author Share Posted March 5, 2012 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? Quote Link to comment https://forums.phpfreaks.com/topic/258294-split-from-what-is-the-correct-way-to-use-includes/#findComment-1323965 Share on other sites More sharing options...
WatsonN Posted March 5, 2012 Share Posted March 5, 2012 You could create a new page for each or you could put all your pages into a SQL database and use the GET or POST to call a certain row into the page. Quote Link to comment https://forums.phpfreaks.com/topic/258294-split-from-what-is-the-correct-way-to-use-includes/#findComment-1324019 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.