mysqli_connect (): (HY000 / 1049)
Posted: 20. March 2021 18:31
Hello, when I open the local host on the web on XAMPP , the folder where the PHP web page is, I open it and the following code appears
Warning: mysqli_connect (): (HY000 / 1049): Unknown database 'school_system_2' in C: \ xampp \ htdocs \ test \ models \ Server.php on line 23
Fatal error: Uncaught TypeError: mysqli_error (): Argument # 1 ($ mysql) must be of type mysqli, bool given in C: \ xampp \ htdocs \ test \ models \ Server.php: 23 Stack trace: # 0 C: \ xampp \ htdocs \ test \ models \ Server.php (23): mysqli_error (false) # 1 C: \ xampp \ htdocs \ test \ models \ Login.php (12): Server -> __ construct () # 2 C: \ xampp \ htdocs \ test \ controllers \ index_controller.php (15): Login -> __ construct () # 3 C: \ xampp \ htdocs \ test \ Index.php (3): require_once ('C: \\ xampp \\ htdocs ... ') # 4 {main} thrown in C: \ xampp \ htdocs \ test \ models \ Server.php on line 23.
What do you recommend me to do?
Warning: mysqli_connect (): (HY000 / 1049): Unknown database 'school_system_2' in C: \ xampp \ htdocs \ test \ models \ Server.php on line 23
Fatal error: Uncaught TypeError: mysqli_error (): Argument # 1 ($ mysql) must be of type mysqli, bool given in C: \ xampp \ htdocs \ test \ models \ Server.php: 23 Stack trace: # 0 C: \ xampp \ htdocs \ test \ models \ Server.php (23): mysqli_error (false) # 1 C: \ xampp \ htdocs \ test \ models \ Login.php (12): Server -> __ construct () # 2 C: \ xampp \ htdocs \ test \ controllers \ index_controller.php (15): Login -> __ construct () # 3 C: \ xampp \ htdocs \ test \ Index.php (3): require_once ('C: \\ xampp \\ htdocs ... ') # 4 {main} thrown in C: \ xampp \ htdocs \ test \ models \ Server.php on line 23.
What do you recommend me to do?