Morph an object
| From: | Info@Best-IT | Date: | Wed, 04 Jun 2003 21:43:47 +0000 |
| Subject: | Morph an object | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-150275@lists.php.net to get a copy of this message | ||
All ye noble Knights of PHP:
Got an interesting problem,
I am creating a login routine for my PHP website. Each page is an extension
of the root page object. I am creating a loginpage.php which is an object
with a constructor:
class Login extends Page
{
function Login($file)
{
if(isset($file)){
if(!isset($this->content)){
$this->content = $this -> Display($this -> SetContent($file));
print ($this->content);
} else {
$this -> DisplayNothing();
$this->content = $this -> Display($this -> SetContent($file));
print ($this->content);
}
} else {
mysql_error();
}
}
Note the DisplayNothing(); function call, I am attempting to remove what is
currently displayed on the browser window and replace it with new content.
I am trying to do this by invoking the constructor in another script with a
different argument.
It is not working and I am wondering is anyone can give me some insight into
morphing an object?
Thanks!/T