I'm trying to make oop class to get user info but i get this error 

**Fatal error: Call to a member function prepare() on a non-object in functions.php**

user.php - >

```
include_once 'functions.php';
$user = new User();

echo $user->get_fullname(5);

```

functions.php ->

```
include_once 'database.php';
class User 
{
    public function connect()
    {
        $dbh = new DB_Class();
    }

    public function get_fullname($uid)
    {

        $getName = $dbh->prepare("SELECT EmailAddress FROM users WHERE UserID =:username");
        $getName->bindParam(':username', $uid);
        $getName->execute();
        $rowName = $getName->fetch();
        $email = $rowName['emailaddress'];
        return $email;

    }    
}

```

database.php - >

```
class DB_Class
{
    public function connect() {
        try {
            $dbh= new PDO("mysql:host=localhost;dbname=root",'users','password', array(
                PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
                PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
            ));
        } catch (PDOException $e) {
            echo $e->getMessage();
        }

        $dbh->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_WARNING);
        $dbh->setAttribute(PDO::ATTR_CASE,PDO::CASE_LOWER);
    }

}

```

What i'm doing wrong :(