MySQL - phpmyadmin: Access denied for user 'test'@'localhost'
Hi everyone,this is my first post. I need some help with MySQL because I am getting the error "Access denied for user 'test'@'localhost'". I have set up a database and it contains two tables. I have some php code which inserts info into one of the tables.
My problem is that I had created a user 'test' with no password. I have two .php files, one inserts data into the first table and the second to the other. Both of these use the same user and password.
The first one has no trouble inserting into the database and I can see that it inserts, but when I run the second php file it gives me the above error. What's wrong? I've looked all over for the answers but nothing works. Why does it work for one and not the other?
This is the code where it's stalling:
$connection = mysql_connect ("localhost", $username, $password);
where my username and password is the same for both files.
username = test, password = ""