Welcome to WebmasterWorld Guest from 54.196.147.57

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

password login encrypt

     

tr8er8

5:29 am on Dec 17, 2008 (gmt 0)

5+ Year Member



how would you retrieve a password from the database to use it to login if you put it in as like:

$hash = md5($salt1.$password.$salt2);

then like insert it in, i need to like have it so if the $_POST['password'] == $hashedPassword, but im not sure how to like do that.

eelixduppy

5:35 am on Dec 17, 2008 (gmt 0)

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 5+ Year Member



You have to compare the hashes, not the password text itself.


if(md5($salt1.$_POST['password'].$salt2) == $pass_from_database)
#you're good

tr8er8

5:58 am on Dec 17, 2008 (gmt 0)

5+ Year Member



thanks man i got it :D
 

Featured Threads

Hot Threads This Week

Hot Threads This Month