tags:

views:

172

answers:

1

Hello,

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.

+1  A: 

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));
ILMV
Thanks ILMV, you're right.
garcon1986
No problem, glad I could help :-)
ILMV