I am new to programming and I'm totally stuck, so I thought I will ask experienced programmers for help. I created a SQL database called "books" using phpMyadmin on WAMP server. The database and its tables show properly on phpMyadmin and also on the MySQL console. I've been trying to connect to the database using the following PHP code:

```
    $hs = "localhost";
    $us = "heman";
    $ps = "password";
    $dbs = "books";

    $db = new mysqli($hs, $us, $ps, $dbs);

    if (mysqli_connect_error()) {
        echo "Error! Could not connect to the database." . $db->connect_error . $db->connect_errno;
    exit;
    }   else {echo "Connected to Server.";};

```

And, this is the error I am getting all the time:

( ! ) Warning: mysqli::\_\_construct(): (HY000/1045): Access denied for user 'heman'@'localhost' (using password: YES) in C:\wamp64\www\Bookorama\results.php on line 31

Error! Could not connect to the database.Access denied for user 'heman'@'localhost' (using password: YES) 1045.

I would really appreciate your help.
Thanks!

[![enter image description here](https://i.stack.imgur.com/xSFaF.png)](https://i.stack.imgur.com/xSFaF.png)