Enter Table On Several Pages

This is a discussion on "Enter Table On Several Pages" within the Starting Out section. This forum, and the thread "Enter Table On Several Pages are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Starting Out

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 21st, 2007, 22:31
New Member
Join Date: Jul 2007
Location: Sutton
Age: 48
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Enter Table On Several Pages

I have a Links section which has 40 sub pages, at the top of each page I am wanting to show the same list of titles, these are edited frequently and at present I have to edit all 40 pages with the same changes.

Please help how to link one list on to all 40 pages so only the one list requires editing.

Ther must be an easy way around it?
Reply With Quote

  #2 (permalink)  
Old Jul 21st, 2007, 22:38
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Enter Table On Several Pages

There is a better way but it's not necessarily easier to start.
You are going to need to use php includes.

You'll start with a page titled something like, table.php
In that page you will set up your table as you want it to look on all 40 pages.

Where you want the table to appear on the links page you will use the include php coding found here.
Code: Select all
<?php include("table.php"); ?>
Then resave each links page as a php page. links1.php, links2.php (of course any name you want them to be is fine)

Here is a tutorial http://www.phpfreaks.com/tutorials/131/0.php

I'm not great at describing step by step so have a glance at the tutorial and see if it makes sense.
Oh I should mention the magic takes place later.

When you want to make a change to the links table, you only go to the page table.php Make the change there and presto all the changes will appear in all the rest of the pages.
Reply With Quote
  #3 (permalink)  
Old Jul 22nd, 2007, 08:33
New Member
Join Date: Jul 2007
Location: Sutton
Age: 48
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Enter Table On Several Pages

Many thanks for the info, I will give it a try as it will make things far easier.
Reply With Quote
  #4 (permalink)  
Old Jul 22nd, 2007, 20:46
New Member
Join Date: Jul 2007
Location: Sutton
Age: 48
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Enter Table On Several Pages

You explained it far better than the tutorial!

Can you please confirm if in the new master page "table.php" all the html tags should be included like any HTML page.
<HTML> <HEAD>
<BODY>
</BODY>
</HTML>

I have included them and it works, but did not know if the above should be included?
Reply With Quote
  #5 (permalink)  
Old Jul 22nd, 2007, 21:36
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Enter Table On Several Pages

Yes that's perfect. You need to set it up as any normal page, just save it as a .php

Your life will be so much easier now..
Reply With Quote
  #6 (permalink)  
Old Jul 22nd, 2007, 22:08
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Enter Table On Several Pages

Just as an aside, this does not HAVE to be php. It could be ASP, JSP or a multitude of other server side languages. Even normal HTML pages saved with a .shtml extension should allow server side includes in this fashion.

I just thought it worth pointing out that php isnt the only choice for what magpie is trying to achieve.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #7 (permalink)  
Old Jul 22nd, 2007, 23:04
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Enter Table On Several Pages

Definitely, I think that part of the reson php is so popular is because of includes and mail forms. People start with something simple and then when (if) they want to make a cms or similar turn to php because they are familiar with the very basics. I am personally believe that asp is a stronger language than php when you take into acount some of its features. Though it does have its issues as do all languages.

Magpie, includes (no matter what language you use) will make your life so much simpler. In the long run they will not only save you time when maintaining the site but can also save on storage. After a while their becomes almost a habit and I find that I use them for even the simplest sites. It means I can cut down on code and maintain consistency.

Pete.
Reply With Quote
  #8 (permalink)  
Old Jul 23rd, 2007, 11:54
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Enter Table On Several Pages

This article might help

Using includes to add common elements to your sites.
Reply With Quote
  #9 (permalink)  
Old Jul 23rd, 2007, 19:29
New Member
Join Date: Jul 2007
Location: Sutton
Age: 48
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Enter Table On Several Pages

Thanks for the comments.

As one of the pages (at the moment an .html extension) is one of the top 10 out of 1.8 million in Google for "Football Kit Suppliers" I was wary of changing the page to a .php as the page would have to get picked up again by Google and fight its way back through all the other pages.
But do I read it correctly that this could stay as an html and the .php included in the page would still work, or does the page have to change to .shtml, or .php etc . I can try but wondered what you thought.
Reply With Quote
Reply

Tags
table

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
WOTM June Nominations - Enter Now ! CloudedVision Announcements and News 0 May 14th, 2008 21:52
[SOLVED] how to invoking the button through keyboard enter after entering the... camarun20 JavaScript Forum 2 Mar 18th, 2008 05:20
enter text in form menu Paula Web Page Design 1 Aug 15th, 2006 17:31
Enter key logs out instead of submits mr300 ASP.NET Forum 1 Aug 7th, 2006 17:42


All times are GMT. The time now is 01:55.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43