I checked the passwords for the users against the DB.
What is faster, the MySQL MD5 function
... pwd = MD5(\'.$pwd.\')
I don't know which is faster, but if you do it in PHP you avoid the possibility of SQL injection.