View Single Post
 
Old August 18th, 2003, 01:54 PM
nikolai nikolai is offline
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, there's no such thing as $_GLOBALS -- I assume you mean $GLOBALS (no underscore!).

The reason you'd store variables in one and not the other basically boil down to one question: Do you need the value of these variables to persist across page requests?

If so, you need sessions. That's what sessions are.

If not, store the variable in whatever place is most appropriate. If you're within function or class scope, you typically don't store stuff in global scope. Store it locally within that class or function.

HTH!


Take care,

Nik
http://www.bigaction.org/