Header and footer codes?

Discussion in 'Web Design' started by kiko_friendly, Mar 10, 2007.

to remove all ads.
  1. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    It's PHP, right? :eek: :(

    Anyone know where I can get a good header and footer code?

    I want to rid myself of frames, and I don't want to update EVERY page of my site each time I make one update!
     
  2. zkiller

    zkiller Super Moderator Staff Member

    Messages:
    1,639
    just use server side includes. this would allow you to insert tid bits of code, such as a header or footer, into your page, that are stored within separate files, thus making updates very simple.

    the standard html code for this is...

    Code:
    <!--#include file="filename.htm" -->
    when used in conjunction with php, the code is slightly different. but, unfortunately i never took the time to learn php and as in such don't recall what it was. hope that helps a little though.
     
  3. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    Thankyou! :D
     
  4. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
  5. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    Oh and I don't know PHP, so if you know of a PHP header, I'd love to know - but I wont understand unless you just basically tell me copy and paste codes!
     
  6. zkiller

    zkiller Super Moderator Staff Member

    Messages:
    1,639
  7. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    Thanks a lot! I wont use that yet, though. I will next time I change the layout. I just used frames again in the end! :(
     
  8. zkiller

    zkiller Super Moderator Staff Member

    Messages:
    1,639
    lol... love the new header image. :)
     
  9. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    It's still not working. :(

    I'm stuck with iframes and iframes + google = death!
     
  10. zkiller

    zkiller Super Moderator Staff Member

    Messages:
    1,639
    can you post the code?
     
  11. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
  12. zkiller

    zkiller Super Moderator Staff Member

    Messages:
    1,639
    that won't tell me whether your includes are working or not though. much like server side scripting languages, the browser will only show pure html.

    also, i get redirected to a error page when i click on the first link.

    your code should look something like this in the index.shtm

    Code:
    <html>
    <head>
    <title>title goes here</title>
    </head>
    
    <body>
    <!--#include file="header.htm" -->
    
    <table>
       <tr>
          <td><!--#include file="menu.htm" --></td>
          <td>Your content would go here</td>
       </tr>
    </table>
    
    <!--#include file="footer.htm" -->
    </body>
    </html>
    
    the file extension of your includes can be whatever you like. i like to create a separate folder for them and give them a file extension of .inc
     
  13. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    I will try that again!
     
  14. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
  15. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
  16. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    Also, may I need to install ASP or anything like that?
     
  17. zkiller

    zkiller Super Moderator Staff Member

    Messages:
    1,639
    only if you use .asp files. asp is part of IIS.
     
  18. zkiller

    zkiller Super Moderator Staff Member

    Messages:
    1,639
    i just get redirected to an error page at that link. can you maybe send me the files so i can take a look at them and then shoot them back you? my email is zkiller[at]gmail.com
     
  19. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    I've uploaded the indexes.shtm page.

    Sorry about that. I am always forgetting things like that.
     
  20. kiko_friendly

    kiko_friendly New Member

    Messages:
    305
    I tried the files with top.htm and bottom.html, too. That didn't work, either. That's why I changed it to .inc (which wont work either).
     

Share This Page