php code which is functioning very well in my computer but whenever i am uploading my files to my Cpanel not working receiving this error message:
Warning: mysqli::mysqli() [mysqli.mysqli]: (42000/1044): Access denied for user '*****'@'localhost' to database '*****' in /home/*****/public_html/Admin Panel/db.php on line 3 Unable to connect to database [Access denied for user '*****'@'localhost' to database '*****']
My username and password both are 100% correct but i don't know why i am receiving this.
<?php
$connection=new mysqli('localhost', 'CpanelName_username', 'test.123', 'CpanelName_DB');
if($connection->connect_errno > 0){
die('Unable to connect to database [' . $connection->connect_error . ']');
}
?>