[Solved] How do i MD5 crypt password at registration?


You need to use like that for your INSERT Statement:

$user_password= md5($_REQUEST['user_password']);

Now how can you select md5() password from database after insertion?

Its very simple, you must need to follow same step:

$user_password= md5($_REQUEST['user_password']); // your input with md5

MD5() PHP Manual

As per manual, it will return you the hash as a 32-character hexadecimal number.

Here is the basic example of md5() hash convert and selection.

// convert md5 hash
$insertString = 'apple';
$convert_md5 = md5($insertString); // 1f3870be274f6c49b3e31a0c6728957f

// select md5 hash
$selectString = 'apple';
if (md5($selectString) === $convert_md5) {
    echo "Would you like a green or red apple?";
}

4

solved How do i MD5 crypt password at registration?