public function __construct($host, $user, $password, $database = "mysqlslideshow", $table = "mysqlslideshow") { $database = is_null($database) ? 'mysqlslideshow' : $database; $table = is_null($table) ? 'mysqlslideshow' : $table; $this->table = $table; // Call the Database constructor parent::__construct($host, $user, $password, $database); // open the database }