It seem's to me that you have several problems.
The first one is lack of password for admin in .php file that you're using to talk with database. That results in "Connection fails".
The second problem could have different sources. My guess is:
supplied argument (or a variable) do not match with fields in MySQL table.
If you e-mail me a .php file, and if you describe the table in question, I could solve your problems.