I have a website that connects to a database and retrieves page content and all works fine. However, I then use the same database connection to connect to and retrieve user details for logging in to my site (2 tables but both in same database). However, I get the following error message when doing this.
Warning: mysql_query() [function.mysql-query]: Access denied for user 'username'@'localhost' (using password: NO)