Im not 100% percent sure if im doing this right, can someone look at my code and just fill me in on what i'm doing wrong. 

When I test the code nothing happens in the database, and no errors listed on the page.

This is the config.php file

```
<?php
// defines database connection data
define('DB_HOST', 'localhost');
define('DB_USER', '*******');
define('DB_PASSWORD', '********');
define('DB_DATABASE', 'BetterGamerzUnited');
?>

```

register.class.php

```
class Register {

    private $conn;

    public function __construct() {
        try { 
            $this->conn = new PDO("mysql:host=".DB_HOST.";dbname=".DB_DATABASE, DB_USER, DB_PASSWORD);
        } catch(Exception $e) { 
            var_dump($e);
        }
    }

    public function __destruct() {
        $this->conn->close();
    }

    public function addUser($first_name, $last_name, $username, $password, $email, $country, $gender, $ip) {
        try {
            $query = "INSERT INTO users (username, email, firstname, lastname, password, gender, country, ip, signup, lastlogin, notescheck) VALUES (?, ?, ?, ?, ?, ?, ?, ?, now(), now(), now())";
            $stmt = $this->conn->prepare($query);
            $stmt->bindValue(1, $username);
            $stmt->bindValue(2, $email);
            $stmt->bindValue(3, $first_name);
            $stmt->bindValue(4, $last_name);
            $stmt->bindValue(5, $password);
            $stmt->bindValue(6, $gender);
            $stmt->bindValue(7, $country);
            $stmt->bindValue(8, $ip);
            $stmt->execute();
            $this->conn->close();
        }catch(PDOException $e) {
            echo 'There was an error';
        }
    }
}

```

Then here is register.php

```
<?php 

require_once 'class/register.class.php';

$register = new Register();

$register->addUser('Andrew', 'McComs', 'test', 'test', 'testtest@test.com', 'usa', 'm', '192.168.0.1');
echo $register->addUser();

?>

```

Nothing is echoing to the screen, and its not going in to the database.