Im getting errors when attempting to connect a simple script to my webhosting account. (Should i be using "localhost" here or the web host?)
//Setup server connection
$servername = "localhost";
$username = "dummy_dummy"; (CpanelName_DataBaseUserName)
$password = "password";
$dbname = "dummy_exo"; (CpanelName_DataBase)
//Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
All of the above information is completely correct (User, password, DB name)
Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home1/name/public_html/index.php on line 38
Warning: mysql_query(): A link to the server could not be established in /home1/name/public_html/index.php on line 38
Im fairly new to php so using a script to connect to an actual hosting account isnt going well for me