开发者

how to use md5() and crypt() together in php and msyql

开发者 https://www.devze.com 2022-12-11 11:58 出处:网络
I want to use md5() and crypt() together in php login authentication. 开发者_如何学运维I tried to use md5(crypt(string),salt); but i can\'t login in mysql.

I want to use md5() and crypt() together in php login authentication.

开发者_如何学运维I tried to use md5(crypt(string),salt); but i can't login in mysql.

Does anyone know how to use them together? Thanks a lot.


You've got the salt in the wrong function for a start:

md5(crypt(string,salt));

Also, assuming string and salt are variables you will need to prefix them with $:

md5(crypt($string,$salt));
0

精彩评论

暂无评论...
验证码 换一张
取 消