Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- if ($pass==$pass2) check not working as expected


oilyflutesalad - 1:23 pm on Nov 23, 2008 (gmt 0)


I've never saved a raw password in the database, I use base64_encode() so a password can be decoded at a later date for use in a forgot password script when I write one.

As per the edit in my last post, I've added a second column in the database to store an md5 encoded password in addition to the base_64 version. Everything is now working fine, but I'm intrigued as to why PHP fails to match two equal values when they are base64_encoded. Maybe it has something to do with symbols such as "=" at the end of the string?


Thread source:: http://www.webmasterworld.com/php/3792412.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com