I'm a newbie to php and have been working my way through some tutorials however I'm coming up with the following error:
Cannot instantiate non-existent class: pdo in...
The line I'm pointed to contains this:
Code: Select all
$db = new PDO(DB_INFO, DB_USER, DB_PASS);Code: Select all
include_once 'db.inc.php';Code: Select all
<?php
define('DB_INFO', 'xxx');
define('DB_USER', 'yyy');
define('DB_PASS', 'zzz');
?>Code: Select all
<?php
$link = mysql_connect('xxx', 'yyy', 'zzz');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>Please can someone point me in the right direction.
I'm replacing the xxx, yyy and zzz with the database name, username and password.
Thanks in advance.
Regards,
Nick