PDO error: could not connect to DB, error: PDOException: SQLSTATE[HY000] [1045] Access denied for user 'test'@'localhost' (using password: YES) in /var/www/html/example/ajax/database-students.php:10
Stack trace:
#0 /var/www/html/example/ajax/database-students.php(10): PDO->__construct()
#1 /var/www/html/example/ajax/4-ajaxExample.php(2): include('...')
#2 {main}
Warning: Undefined variable $pdo in /var/www/html/example/ajax/4-ajaxExample.php on line 4
Fatal error: Uncaught Error: Call to a member function prepare() on null in /var/www/html/example/ajax/4-ajaxExample.php:4
Stack trace:
#0 {main}
thrown in /var/www/html/example/ajax/4-ajaxExample.php on line 4