Need help in php login and data retrieve part

can anyone please look the coding part of my project of library system.currently i fail to login ,something like failed to connect database.
i will upload the whole file,i hope someone will point me out my error and let me learn from error.

complete file can be download at link below:
htdocs123.rar - Windows Live

Welcome to Sitepoint renabada, what errors do you get?

actually ,i created a check login php for user,but i cant pass the verification…
hard to explain,i think my project will ok if i solve this login problem…