Reply
Old password check, update password
Old 04-16-2008, 08:07 PM Old password check, update password
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
How do I check if the field of 'old password' matches that of the database??

if it does...execute the sql query.
Gilligan is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-16-2008, 10:45 PM Re: Old password check, update password
Webmaster Talker

Posts: 560
Just check to see if the text they entered (md5 hashed) = the password field in the database, which should be hashed already.

Matt
170 Designs is offline
Reply With Quote
View Public Profile
 
Old 04-17-2008, 08:01 AM Re: Old password check, update password
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
How would I code that, I'm not great with SQL commands
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 04-17-2008, 11:15 AM Re: Old password check, update password
Webmaster Talker

Posts: 560
When first inserting the password into the database, run this first:

http://us2.php.net/md5

Then when the user types in the old password, run the same thing and then compare this to the password stored in the database. Should be basically:

if (oldpassword = passwordinDB)
run sql query

You'll just need to do the exact syntax and also grab the password from the DB before you do that and store it in something temporary

Matt
170 Designs is offline
Reply With Quote
View Public Profile
 
Old 04-17-2008, 11:41 AM Re: Old password check, update password
Gilligan's Avatar
Dead Like Me

Posts: 1,608
Name: Stefan
Location: London, UK
I md5 it anyway

Just found what I could do,

if (oldpass == password cookie)
Gilligan is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Old password check, update password
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.21051 seconds with 13 queries