could you post the code please? there is no possible way we can give you a solution to your problem without seeing your code. there are several things that could be wrong with your code...
Another reason that it has to be the login.php page is because if you try to register 2 of the same names it will tell you can't. So i know it is connecting to the database. But when it tries to login theres ethier something missing or somethings wrong with the script.
Please don't double post.
I would hope that the stored passwords are encrypted in which case you need to encrypt the posted password and search for that in the database.
I didn't mean to double post i apologize. See i don't know anything about php or MySQL this is my first code. and the whole registering part works. Its pulling the username and password from the database when the person logs in thats were the problem is.
Did you verify the data is present in MySQL? Through phpMyAdmin probably. Also, besided the fact that you should be using mysql_real_escape_string() on the query, you should probably force user names to be lowercase, or make sure your type the exact case you registered in (UserName, cannot be logged in as username, Username, USERNAME, etc.)