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/recap-ajax/database.php:10 Stack trace: #0 /var/www/html/example/recap-ajax/database.php(10): PDO->__construct() #1 /var/www/html/example/recap-ajax/functions.php(2): include('...') #2 /var/www/html/example/recap-ajax/index.php(2): include('...') #3 {main}
Fatal error: Uncaught Error: Call to a member function prepare() on null in /var/www/html/example/recap-ajax/functions.php:23 Stack trace: #0 /var/www/html/example/recap-ajax/index.php(3): getAllStudents() #1 {main} thrown in /var/www/html/example/recap-ajax/functions.php on line 23