Trying to connect with a database using PDO, I keep getting the error could "not find driver". Looking online, I'm guessing this is a configuration error, but I don't know how to fix it. Code:
try
{
$conn = new PDO("mysql:host=localhost;dbname=dubook", "root", "password");
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// more code here
}
catch(PDOException $e)
{
echo "Connection to DB failed: " . $e->getMessage();
}