guys, I'm having some problem here, after I created my registration form (username and password fields only) using this code [quote] <?php $host = ''; $uname = "root"; $pass = ""; $database = "db"; $tablename = "login"; $username = $_POST[customerId]; $password = $_POST[password]; $enc_pwd = md5($password); $connection = mysql_connect ($host,$uname,$pass) or die("Database connection failed, please re-check!!"); $result = mysql_select_db($database) or die ("Database could not selected, please check again!!"); $query = "INSERT INTO $tablename VALUES('$username','$password')"; //change $password to $enc_pwd for encrypted password!!! $result = mysql_query($query); if (!$result) { die ("query failed, please check again <br>"); } ?> [/quote] that code above is for creating new user and it works, when I go to mysql in phpmyadmin it says the password for this use is 234242hj4hj24hj. but then I created the login form, with these code [quote] <?php $host = ''; $uname = "root"; $pass = ""; $database = "db"; $tablename = "login"; $username = $_POST[customerId]; $password = $_POST[password]; $enc_pwd = md5($password); $connection = mysql_connect ($host,$uname,$pass) or die("Database connection failed, please re-check!!"); $result = mysql_select_db($database) or die ("Database could not selected, please check again!!"); $query = "SELECT * from $tablename where customerId = '$username' and password = '$enc_pwd'"; $result = mysql_query($query); if ($row = mysql_fetch_array($result)) { if(!$enc_pwd == $row[password]) { die ("Wrong Password"); } } else { die ("User not exists/password Incorrect"); } ?> [/quote] and it seems I could not retrieve the data from the database... it always says "User not exists/password Incorrect", checked the HTML form with the login everything are same, oh boy, it suxs I tried over over and over still no luck, maybe some1 here can help me, HELPP!! many thanks