Unknown errors on "Build Your Own Database Driven Web Site Using PHP & MySQL"

Are you running it locally or on a shared server?

Locally. But that shouldn’t matter. So long as the username, password, and database name are correct, it should work.

Can you do the following:
Create a PHP file with the following in it:

<?php phpinfo(); ?>

Save it, upload it, and run it. Then search for the following string on that page: “mysqli”

If you don’t find that listed anywhere, then that’s your issue, your server doesn’t support mysqli. Next do a search for “pdo_mysql”, let me know if that is listed.

Once you have determined if either of those are listed, delete the file from the shared server.

Both returned results:
mysqli: http://imgur.com/s1fHj8J and http://imgur.com/q2aOZIV
pdo_mysql: http://imgur.com/zRWRuDI
Did you have to paste the sql code somewhere and run it? It was not in my db, so I had to go to phpMyAdmin and paste it in there/run it.

And you are still getting an error regarding the use of mysqli_query right?

Can you verify that line 17 in db.inc.php has the correct database name in it?

Yes. I used the same one as in line 2 of db.inc.php