pocklove Posted March 20, 2009 Report Share Posted March 20, 2009 Hi, I have a table I want to display, say a sports league table. On the 'tables page' there is the full table for example 1. Team 1 5-0 2. Team 2 4-1 3. Team 3 4-1 4. My Team 3-2 5. Team 4 3-2 6. Team 5 1-4 etc etc I want to show a preview of this on the home page so it only shows My team, and the teams directly above and directly below, so, example 3. Team 3 4-1 4. My Team 3-2 5. Team 4 3-2 Question: Can I link the preview on the home page to the full table on the 'tables' page so I dont have to update both pages every time the league changes? I just want to have to update the full table once and then the preview feed off that. Hope that makes sense. Cheers. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 20, 2009 Report Share Posted March 20, 2009 Take a look at PHP Includes -- perhaps that would be an easy way to accomplish this: http://www.killersites.com/forums/topic/357/repeating-sections-of-code-on-many-pages/ Quote Link to comment Share on other sites More sharing options...
pocklove Posted March 20, 2009 Author Report Share Posted March 20, 2009 Is it possible to use PHP include to only include part of another page? (ie the part of the table I want to show as a preview) If I did it that way wouldn't I have to update the 'tables page' (That includes the whole table) and the PHP file (That would include the section I need to preview), so that would mean updating two files? In which case I may as well update the 'tables page' and the home page. Unless there is a way to use PHP include to only include part of a selected page??? Quote Link to comment Share on other sites More sharing options...
falkencreative Posted March 21, 2009 Report Share Posted March 21, 2009 Hmm, you're probably right -- even if you use an include, you'll still need to edit two files. The only other way I can think of would be to store that information in a database, and then use PHP or ASP.NET to retrieve the information and display it. Quote Link to comment Share on other sites More sharing options...
pocklove Posted March 21, 2009 Author Report Share Posted March 21, 2009 Thanks, I'm not quite ready for the world of databases yet, I'm gonna try and pick that up in the sumer. I'll look into it again then. Thanks. Quote Link to comment Share on other sites More sharing options...
lm Posted March 21, 2009 Report Share Posted March 21, 2009 you can always use excerpt to include part of one page ( in your case from 'tables" page) to another ( home page). Just include in it what you need to display. Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.