homepage Welcome to WebmasterWorld Guest from 54.234.42.16
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Pubcon Website
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library : Charter : Moderators: coopster & eelixduppy & jatar k

PHP Server Side Scripting Forum

    
password login encrypt
tr8er8




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

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




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

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


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

tr8er8




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

thanks man i got it :D

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved