Header/menu/footer ??

Discussion in 'PHP' started by tptnyc, Aug 16, 2008.

  1. #1
    Typically, Header,Menu_items and Footer files are created and then coding is given in the index.php in order to flow all the 3 files info into all the additional pages. What all phpcoding is needed to create those 3 files (header,menu_items & footer? (any sample to view?)
     
    tptnyc, Aug 16, 2008 IP
  2. Louis11

    Louis11 Active Member

    Messages:
    783
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    70
    #2
    Research: require_once, require, include and SMARTY templates.
     
    Louis11, Aug 17, 2008 IP
  3. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for info.
     
    tptnyc, Aug 19, 2008 IP
  4. Fl1p

    Fl1p Active Member

    Messages:
    511
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Fl1p, Aug 19, 2008 IP
  5. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks Fl1p. This is the best I have come across so far for php.
     
    tptnyc, Aug 21, 2008 IP
  6. adultwordpressthemes

    adultwordpressthemes Active Member

    Messages:
    102
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    83
    #6
    It all depends what your trying to accomplish.

    Just to break a page into sections for including only requires use of the include() function.

    The other pages could be just plain html
     
    adultwordpressthemes, Aug 21, 2008 IP
  7. elias_sorensen

    elias_sorensen Well-Known Member

    Messages:
    852
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #7
    I do normally have a folder called /includes/ where I put a top.php and bottom.php in. In every file, have this content:
    <? require("includes/top.php"); ?>
    Content here
    <? require("includes/bottom.php"); ?>

    And in top.php, I call mysql.php and session_start() in the top etc.
     
    elias_sorensen, Aug 22, 2008 IP
  8. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Won't it be better to have separate files for header.php, footer.php, menu.php and show all the three as includes in index.php and let also flow into other additional pages?
     
    tptnyc, Aug 23, 2008 IP