I've searched for an answer before but nothing seems to work. Thats the code I use to set up the connection.
<?php
// connect to the database
$conn = mysqli_connect('localhost', 'user', '123456', 'user_data');
// check connection
if(!$conn){
echo 'Connection error: '. mysqli_connect_error();
}
?>
And that's the error message I recieve as soon as I try to open the file itself or try to include it anywhere else.
Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'user'@'localhost' (using password: YES) in C:\xampp\htdocs\tutorials\Garten\config\db_connect.php:4 Stack trace: #0 C:\xampp\htdocs\tutorials\Garten\config\db_connect.php(4): mysqli_connect('localhost', 'user', '123456', 'user_data') #1 {main} thrown in C:\xampp\htdocs\tutorials\Garten\config\db_connect.php on line 4
Can anyone help me fix the probleme, that would be great.