Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 3 of 3
  1. #1
    DNF Newbie
    rich993's Avatar
    Join Date
    Dec 2007
    Location
    Nassau, Bahamas
    Posts
    14
    Country

    Bahamas
    DNF$
    524
    Bank
    0
    Total DNF$
    524
    Donate  

    Thumbs up Script to include header and footer with php

    Hello all.

    I've written some code in php to dynamically include a header and footer in your web pages. It's easy to use and cuts down on a lot of work if you are building out mini sites, content sites etc.

    Here is a link to my instructions and code:
    http://toomanysecrets.com/automate-y...er-and-footer/

    If you have any questions, please let me know.

    Enjoy!

    - Richard
    Secure Hosting Ltd. - the leader in offshore hosting solutions since 2001
    Too Many Secrets
    - domain development blog

  2. #2
    þórr mjǫlnir
    draggar's Avatar
    Join Date
    Dec 2007
    Location
    South Florida
    Posts
    12,874
    Country

    Czech Republic
    DNF$
    6,977
    Bank
    116,559
    Total DNF$
    123,536
    Donate  
    You don't have to limit it to headers and footers, I do the same with every part of my pages except for the main content.

    Code:
    <div id="(CSS style)">
     <?php
     require ('page.php');
     ?>
    </div>
    Has become one of my best friends. I also set up a "template" page for when I need to add pages.

    "CSS Style" is defined in your stylesheet.css (or whatever you name it)

    "Page.php" is the name of the page you made, no need for the HTML, HEAD, BODY, etc.. tags etc, just throw in the straight script and this command will tell the browser to throw that code directly in.

    It's great for adding pages, adding links (to a link column), change the header, or footer in a multi page site, you only change one page, not all of them.
    Last edited by draggar; 06-30-2008 at 10:05 AM.
    Save the wolves - join The Wolf Army today!
    Please follow the rules or suffer the wrath of Thor's Hammer.

  3. #3
    DNF Newbie
    rich993's Avatar
    Join Date
    Dec 2007
    Location
    Nassau, Bahamas
    Posts
    14
    Country

    Bahamas
    DNF$
    524
    Bank
    0
    Total DNF$
    524
    Donate  
    Draggar,

    Yep, you're right !
    Secure Hosting Ltd. - the leader in offshore hosting solutions since 2001
    Too Many Secrets
    - domain development blog

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
  •  

Domain name forum recommended by Domaining.com