wannabephpdude Posted August 10, 2006 Share Posted August 10, 2006 I have written a [color=red]"login"[/color] system for one of my websites that works with a [color=green]MySQL[/color] database and a [color=orange]cookie[/color]. I would like to store the password in the MySQL database encrypted (via hash). I know phpBB does it using hash some how. Does anyone know of some tutorials I can read about HASH?Thanks in advance. PEACE. Quote Link to comment Share on other sites More sharing options...
zq29 Posted August 10, 2006 Share Posted August 10, 2006 Check the following functions in the manual: hash(), md5() sha1(). Quote Link to comment Share on other sites More sharing options...
wannabephpdude Posted August 10, 2006 Author Share Posted August 10, 2006 OK SA. I'm on it. One question though for future reference. Have you much experience using hash? I may ask you some more questions, if that's not a problem.Thanks :) Quote Link to comment Share on other sites More sharing options...
redarrow Posted August 10, 2006 Share Posted August 10, 2006 22 years ask Quote Link to comment Share on other sites More sharing options...
rcharris Posted August 10, 2006 Share Posted August 10, 2006 Even though Im not the best PHP Dude, far from it, MD5 has been the best solution, I use it on all my systems.All you have to do (if I remember, I use the same markup for all my DB's) is that you set the particular row to MD5. To make the Login Box convert what the user types in as their password to MD5 Encryption I think you do add the following to your code (the code that follows the [quote]// This converts the PW to MD5 Hash.$pw_login = md5($pw_login);[/quote]Of Course Im using the variable $pw_login in the rest of my code and this bit to represent the password field.Sorry if its all blurry, no good explaining things_R Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.