![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.php archiveSession/Class help
From: Jon <jonra@netins.com>
Date: Tue Feb 28 2006 - 23:50:18 CET
All,
I'm currently building a custom Content Management system for a site we're
What I need to do is use a variable throughout my classes that is a Session
class C_DisplayContent{
var $username = "S_";
function foo(){
}//end class
So, what I really need now is to have the variable look like this:
var $username = $_SESSION['username'];
and be able to use it like normal using the $this->username syntax. However,
Parse error: parse error, unexpected T_VARIABLE in
The line is of course the line where I'm assigning the variable.
What am I missing in regards to using session variables within a class? Any
|