error_reporting(-1);
ini_set('display_errors','On');
//the login credentials for the database
$db_hostname = 'localhost';
$db_database = 'car';
$db_username = 'root';
$db_password = '';
$link = mysqli_connect($db_hostname, $db_database, $db_username, $db_password);
if (!$link) die("Unable to connect to MySQL: " . mysqli_connect_error());
//selecting the database a die statement terminates the program
$db_selected = mysqli_select_db($link, $db_database)
or die("Unable to select database: " . mysqli_error());
?>
this is the error though wamp
Unable to connect to MySQL: Access denied for user 'car'@'localhost' (using password: YES)