oop - PHP user class with login access -
i've searched login system in google thing i'm trying there myself, , not following guide tells me everything. i have index.php has menu.php included in top, has include login_form.php, calls login.php make login. in login.php uses class user make login. user.php has require_once connection.php i'm failing @ easy fix can't quite see new me. problem error happens: undefined variable: mysql in admin\include\lib\user.php on line 12 connection.php: require_once 'constants.php'; $mysql = new mysqli($db['host'], $db['username'], $db['password'], $db['name']); if ($mysql->connect_error){ die('connection error (' . $mysql->connect_errno.')'. $mysql->connect_error); } user.php -> line 12: $this->password=$mysql->real_escape_string($this->password); as side note index.php require_once connection.php, constants.php (which has $db array host, user, etc..), , class.php. i