Access denied for user ''@'localhost' (using password: NO)?
Posted on 2009-04-09
Hey. There is something wrong with my PHP-file, I think. On my homepage is some iframes which shows a PHP-file (RAY_item.php). On my homepage is also a login-check to see if an user is connected. RAY_item takes some "random" items from my MySQL and then displays them (for the user that is signed on, so that user will further down the road be able to change each item that is shown to him). The signing-on part works perfectly. But there is a problem, I think it is RAY_item that is at fault. When I enter the homepage, instead of 3-4 items in my iframe, my iframe says this:
"Access denied for user 'distende'@'localhost' (using password: NO)"
Why is that? I am certain I have typed my password and database name correctly on this. Maybe it have something to do with this: "$db = @mysql_select_db($db_name,$connection)or die(mysql_error());"
I am not sure if I should write anything and if I should, what I should write, at $db_name and $connection.
Thanks for the time!