How to include the same table in multiple sites ?

5 replies
  • WEB DESIGN
  • |
Hello

I have 9 websites. I want to include an html table in every footer of those 9 sites. The table code is in a file located on another site (not one of the 9 sites).
All sites are php.

I want this so that I can modify the table from one file instead of having to modify it 9 times.

Is that possible ? And how can I do it ?
#include #multiple #sites #table
  • Profile picture of the author haymanpl
    What theme and framework are you using?
    {{ DiscussionBoard.errors[3631511].message }}
  • Profile picture of the author kjhosein
    Hi cecilio - sure you can do this!

    Since you've already created the common file, I'm assuming with just HTML in it, wherever you want to insert it, use the following snippet of PHP:

    PHP Code:
    <?php include("http://www.maindomain.com/common-footer-code.txt"?>
    It could end in whatever extension. PHP doesn't really care.

    HTH!
    Signature
    <!--PM me for a quicker reply. Thx!-->
    {{ DiscussionBoard.errors[3634806].message }}
  • Profile picture of the author yukon
    Banned
    Iframe & be done with it...
    {{ DiscussionBoard.errors[3678842].message }}
  • Profile picture of the author kjhosein
    Iframe & be done with it...
    iframes are so messy and inelegant (IMHO). Sure, it works, but I don't think it's the way to go. BTW, converting an HTML file to PHP isn't really a difficult thing. Just rename it and bam, it's PHP (as long as your web server is configured to handle php, etc., etc.).
    Signature
    <!--PM me for a quicker reply. Thx!-->
    {{ DiscussionBoard.errors[3684202].message }}

Trending Topics