01-30-2008, 06:50 PM
|
#9 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
A little tip for you as well when using classes:
Try not to echo anything from your class. You should always try to make your class self-contained so that you can just drop it into a project and have it work.
If you echo something from your class then take that class and re-use it in another project that has (for example) a template engine then you would want to parse all text through your template engine rather than echo it.
So in your class above, rather than echo the visitors name, it would be better to return it, then echo it in your main script.
Just keeps everything nice, neat and tidy
Alan
|
|
|