Below is my code that I am using. I know that the details are correct as they are identical to another page that connects to the database fine. However with this code I get the error:
Access denied for user 'un'@'localhost' (using password: YES). Can anyone tell me what it is i'm doing wrong? Thanks
$hostname = 'localhost';
$username = 'un';
$password = 'pw';
$dbname = 'db';
$user = 'admin_uk';
$password = 'r04ryuk';
if($connection = mysqli_connect($hostname, $username, $password, $dbname)){
echo 'slup';
}else{
echo mysqli_connect_error();
}