Results 1 to 5 of 5

Thread: How to call menu from single file to multiple pages?

  1. #1
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to call menu from single file to multiple pages?

    How do I call a single file to multiple pages?

    I want to be able to change my links from a file I call column_left.php to a lot of different html pages. How do I do this?

  2. #2
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    If they're HTML pages, you can't really do this unless you use iFrames.
    Now, if you change these files to PHP files, you can just include column_left.php:

    PHP Code:
    include('column_left.php'); 
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    1,740
    Thanks
    82
    Thanked 90 Times in 88 Posts

    Default

    save the files with php extensions so that it looks like file.php as opposed to file.html and enclose the include line so that it looks like this:

    Code:
    <?php
    include('column_left.php'); 
    ?>
    Make sure you create a file called http://www.column_left.php that has the info you want to go to all of your other files that has the 'include' as well.

    I hope that helps.

  4. #4
    Join Date
    Mar 2006
    Location
    Cleveland, Ohio
    Posts
    574
    Thanks
    6
    Thanked 5 Times in 5 Posts

    Default

    Sorry about the cross-post, James.

    Should be 'column_left.php', though, not 'http://www.column_left.php'...
    Thou com'st in such a questionable shape
    Hamlet, Act 1, Scene 4

  5. #5
    Join Date
    Jul 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you ....

    Thank you both sooo much for the reply. I will try your suggestion.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •