Hi All,

I have a password field to allow a user to log into an admin panel, but I'm having trouble with encryption.

Currently I am adding in the users manually through phpMyAdmin with the following SQL

insert into table (username, password) 
values ('adminuser', md5('adminuserpwd'));
This obvioulsy adds a hashed value into the table. However, when I try and retrieve it for authentication purposes it won't return any rows. What am I doing wrong

PHP Code:
$passCheck mysql_query("select password from form_admin where password = md5('".$_POST['password']."')");
mysql_num_rows($passCheck) == 0)
$error_msg .= "Your password is invalid";
Is there a better way of doing this?