someone can tell me where am I wrong? why i have this message "Fatal error: Call to a member function query() on a non-object" when i try call query function? thank you :)
class Connection extends mysqli {
protected $user;
protected $password;
protected $database;
protected $host;
protected $querymia;
protected $link;
function __construct($user,$pass,$database,$host){
$this->user=$user;
$this->password=$pass;
$this->database=$database;
$this->host=$host;
$this->link= mysqli_connect("$this->host","$this->user","$this->password","$this->database") or die("Error");
}
public function InsertQuery($string,$table){
$this->querymia = 'INSERT INTO' . "$table" . 'VALUE' . '(' . "$string".')' ;
$this->link->query($this->querymia);
}
}