Jump to content

Archived

This topic is now archived and is closed to further replies.

wannabephpdude

HASH?

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Check the following functions in the manual: hash(), md5() sha1().

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
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


Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.