I created a user table with a column for password.
I used the following to insert a row in the table:
$query = "INSERT INTO usersprofile (no_kp, nama_penuh, nama_login, kata_laluan, email, tarikh_daftar) VALUES ('$kp', '$fn', '$u', PASSWORD('$p'), '$e', NOW() )";
$result = @ ($query);
When I tried to query the row as follows:
$query = "SELECT no_kp, nama_penuh FROM usersprofile WHERE nama_login='$u' AND kata_laluan=PASSWORD('$p')";
$result = @ ($query);
the result is 0 row(s) return.
Where did I do wrong?