I am using a normal php/mysql insert query and use md5 to encrypt the password
This is the INSERT query:
$sql = mysql_query(\"INSERT INTO user (username,
Assuming $username and $password are in fact the same... have you checked to make sure the on table users the password column character length is big enough to hold the whole MD5 hash?
$username
$password
users
password
Got an example of the calculated and store MD5 hashes?