need help with my query script. any help greatly appreciated

Im having trouble getting my login to work on my site.
it keeps telling me query failed, but when i echo out the username and password it matches the one on the server so i dont understand why its not working. heres a link to my site http://trieste.sdsu.edu/~trst016/proj2/proj2.html
Im a new programmer by the way very noob.