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!

I figured out the problem. I just remembered to put it on this forum, in case it helps someone. The professionals may find it too stupid. So the problem was that my WAMP server has 2 databases, MySQL and MariaDB. And, since MariaDB was using the Port 3306, my PHP code was trying to access MariaDB using mysqli commands. Here's the solution: