DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars
DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars
Quick Search:  
Register Now! Welcome to Dnforum.com You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us.
Go Back   DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars > Content Development > Website Development and Design Discussion > Coding/Programming/Languages
Start your Domain Reseller Business Today and Earn Money!
Reply
 
LinkBack Thread Tools Display Modes
Old 02-29-2008, 09:02 AM   #1 (permalink)
Platinum Lifetime Member
 
Name: Peter
Last Online: Today 07:07 PM
iTrader: (22)
Join Date: Aug 2005
Posts: 1,145
DNF$: 100
Location: Canada
Country:


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...
__________________
have a nice day
elivate is offline   Reply With Quote
Old 02-29-2008, 09:04 AM   #2 (permalink)
Titles are overrated. :)
 
draggar's Avatar
DNF Verified Member
Verified Member
 
Name: Ed
Last Online: Today 09:07 PM
iTrader: (12)
Join Date: Dec 2007
Posts: 1,624
DNF$: 184
Location: South Florida
Country:


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.
__________________
Ask me about my Domain Management Tool! Only $5!
What's on Draggar's mind?
draggar is online now   Reply With Quote
Old 02-29-2008, 09:12 AM   #3 (permalink)
Platinum Lifetime Member
 
Name: Peter
Last Online: Today 07:07 PM
iTrader: (22)
Join Date: Aug 2005
Posts: 1,145
DNF$: 100
Location: Canada
Country:


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...
__________________
have a nice day
elivate is offline   Reply With Quote
Old 02-29-2008, 09:37 AM   #4 (permalink)
Titles are overrated. :)
 
draggar's Avatar
DNF Verified Member
Verified Member
 
Name: Ed
Last Online: Today 09:07 PM
iTrader: (12)
Join Date: Dec 2007
Posts: 1,624
DNF$: 184
Location: South Florida
Country:


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).
__________________
Ask me about my Domain Management Tool! Only $5!
What's on Draggar's mind?
draggar is online now   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 09:12 PM.
Copyright @2001-2008 DNForum.com