I\'ve got this error:
Fatal error: Call to a member function query() on a non-object in /Applications/XAMPP/xamppfiles/htdocs/login.php on line 8
The line is
variable $mysqli in function check_login is out of scope (it is declare outside the function) so it is null.