Parent variable / class returns null

hotfuzz

New Member
I have a base class and a a second class that's extends the base class. The problem is that I can't access the $db object from the child class, but all normal variables.Any idea why?\[code\]class Base_Login{ protected $member_uri = 'member.php'; protected $db; public function __construct($db_user, $db_password, $db_name, $db_host) { $this->db = new ezSQL_mysql($db_user, $db_password, $db_name, $db_host); var_dump($this->db); //Output: Object content's } }class Facebook_Login extends Base_Login{ public function __construct($app_id, $secret) { var_dump($this->db); //Output: NULL echo $this->member_uri //Output: member.php }}\[/code\]And this is how i call it:\[code\]require("includes/config.php");$base_login = new Base_Login($db_user,$db_password,$db_name,$db_host);$base_login->Facebook_Login = new Facebook_Login($facebook_appID,$facebook_secret);\[/code\]
 
Back
Top