Ignoring that that is a massive invitation to an SQL Injection attack, you should not store passwords in clear text.
There is a quick bit of info here:
Password Storage: How to do it.[
^]
As to your reported problem, it could be anything - you do not give anywhere near enough context for an accurate diagnosis.