[Solved] Call to a member function real_escape_string() on a non-object [closed]

Your verify function does not have an object called $mysqli, it only exist in your MysqlConnect class’s constructor. You can readjust your MysqlConnect class as follows. class MysqlConnect { private $db_host; private $db_usermame; private $db_password; private $db_database; private $mysqli; public function __construct($db_host,$db_usermame,$db_password,$db_database) { $this->db_host = $db_host; $this->db_usermame = $db_usermame; $this->db_password = $db_password; $this->db_database = $db_database; … Read more