I'm getting an error 1049 on my Mysql connect file, however I have verified this table exists. And when I attempt to connect to it via PDO it works perfectly fine. So obviously there's an error in my code I'm missing.
My code:
<?php
$db = new mysqli('localhost', 'root', '', 'mysqliphp');
if ($db->connect_errno) {
die('Houston, we have a problem!');
} else {
Echo 'Everything is fine.';
}
?>
The error:
Warning: mysqli::__construct(): (HY000/1049): Unknown database 'mysqliphp' in C:\xampp2\htdocs\mysqliconnect.php on line 3
Houston, we have a problem!
What is the issue? Thanks in advance!