Good Day everyone. I'm currently facing a problem with my code. I'm an incredibly new and inexperienced programmer and am following along YouTube tutorials to learn, I have currently reached a dead end and have tried various means to fix the following error:
Problem 1: Fatal Error: Uncaught mysqli_sql_exception: Access denied for user 'root'@'localhost'
I have tried fixing this by modifying the config.inc file in the phpMyAdmin folder. However, it still results in the same error despite modifying the $cfg['Servers'][$i]['password'] = ''; code and setting it to either YES or NO.
I found a short workaround by isolating the code that I identified to be the cause, in my code I found that by isolating the $db = new DBController();
Problem 2: $db = new DBController(); error, code for DBController.php function
When I try to isolate the $db = new DBController(); code, this error comes up instead:
I realize that this is due to the undefined $db variable, however, this leads me back to the second problem where I can't figure out why the $db = new DBController function is calling a fatal error despite following the procedure, there's also the issue of me being unable to connect to the root@localhost for php storm, so I cannot initiate any connection to mySQL database.
I apologize since I'm not very well-versed with machine languages such as this, thus am trying to learn but I just hit a dead end and I don't know where to continue from here. Any help at all would be very appreciated, thank you.
For the timestamp it should be at: 2:45:53