So, guys, I did a shopping cart in php using wampserver. I created the DB in mysql and created two BD ones with the name "mxmaster" and another with the name "shop". I made the connections all right in php, creating cart, products, home, through MVC (Object Oriented). But when I put it to pull through the index, to see the BD it gives these errors:
"Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE [HY000] [1049] Unknown database' shop '' in C: \ wamp64 \ www \ shopping \ index.php on line 12 "
But the DBs are created and populated. This is the line of code 12 which he speaks and I have already changed the name to shop and to mxmaster and continue.
$pdo = new \PDO("mysql:host=localhost;dbname=shop", "root", "");
Anyone know how to solve this problem?