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 4 of 4
  1. #1
    Exclusive Lifetime Member
    PeterMan's Avatar
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    1,627
    DNF$
    24,620
    Bank
    0
    Total DNF$
    24,620
    Donate  

    Some basic php tips...

    I just wanted to share a couple of simple tips that may help out some of those who are new to developing sites using .php

    One of the best tips I think is to use includes as often as you can. I always use an include for my main navigation menu and footer, and sometimes for my header, too... This allows you to make updates easily in one place, and saves a lot of time. It also reduces the chances of making a mistake and having conflicting information on your site...

    A basic include in php looks like this:

    Code:
    <? 
         include("menu.php");
    ?>
    Another thing you see a lot is a footer that has a copyright and a date, usually just the year, and it is out of date... Here is an easy way to avoid that problem:

    Code:
    <?php
    $today = date("Y");
    ?>
    
    Copyright © <?=$today?> My Website.
    Anyway, these are just a couple of simple tips I thought I would share...

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

    Czech Republic
    DNF$
    7,005
    Bank
    116,559
    Total DNF$
    123,564
    Donate  
    I LOVE the include() command.

    It is the best for editing headers, footers, link bars, etc..

    Plus, all it has to be is a plain old html page (with no <html><head><body> tags). Whenever you look at my sites each page is a minimum of 3-4 pages, some up to 6 or 7 and does not have a noticeable impact on load speeds, even 56K.
    Save the wolves - join The Wolf Army today!
    Please follow the rules or suffer the wrath of Thor's Hammer.

  3. #3
    Exclusive Lifetime Member
    PeterMan's Avatar
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    1,627
    DNF$
    24,620
    Bank
    0
    Total DNF$
    24,620
    Donate  
    Quote Originally Posted by draggar View Post
    I LOVE the include() command.

    It is the best for editing headers, footers, link bars, etc..

    Plus, all it has to be is a plain old html page (with no <html><head><body> tags). Whenever you look at my sites each page is a minimum of 3-4 pages, some up to 6 or 7 and does not have a noticeable impact on load speeds, even 56K.
    Exactly, these are the sort of small things that can make developing and maintaining sites a lot easier...

    Also, this is obviously not just for .php, you just need to know the proper syntax for the language of choice...

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

    Czech Republic
    DNF$
    7,005
    Bank
    116,559
    Total DNF$
    123,564
    Donate  
    Used correctly, PHP and CSS can make excellent sites, very professional looking, easy to maintain, and no need for "web creation" software (but I will admit, DreamWeaver is great for editing large sites).
    Save the wolves - join The Wolf Army today!
    Please follow the rules or suffer the wrath of Thor's Hammer.

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