Php calling a function in one class out of another
Posted: Mon May 29, 2006 11:13 am
Ok, I'm using a login system from evolt.org - its at http://evolt.org/PHP-Login-System-with-Admin-Features
Now, I have a class called Page which does various stuff including checking if they are logged in by:
now, I can't seem to reference this $session class from within my page class:
I can have the following on my Index Page and it will work fine
However, if I have the following code within the function Make() that creates the page, it will NOT work.
How do I get this working please?
S
Now, I have a class called Page which does various stuff including checking if they are logged in by:
Code: Select all
if($session->logged_in)
{
show logout button
}else {
show login form
}I can have the following on my Index Page and it will work fine
Code: Select all
if($session->logged_in)
{
$indexPage->WriteLoggedIn();
} else {
$indexPage->WriteLoginForm();
}Code: Select all
if($session->logged_in)
{
$this->WriteLoggedIn();
} else {
$this->WriteLoginForm();
}How do I get this working please?
S