When certain pages load on my site I have a script that will add points to the users table in the points row. Here is my script
<?php
session_start();
$db = mysqli_connect("hostname", "username", "password", "database");
$username = $_SESSION['username'];
mysqli_query($db, 'UPDATE login_users SET points_column=points_column+1 WHERE username=$username');
?>
I have already checked the host name, username and password details and everything is correct but I keep getting this error
Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'a5950626_jlf'@'10.1.1.34' (using password: YES) in /home/a5950626/public_html/application/home.php on line 5
PHP Error Message
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home/a5950626/public_html/application/home.php on line 9
Any ideas what the problem could be or how to fix it? Thanks!