EPCtech Posted September 25, 2008 Share Posted September 25, 2008 Hi, I have a code for a password (I want it very secure, because the passwords will be displayed publicly) but for some reason it's not working. In the form, I entered this password: g97RfHd351 $fullcode=mysql_real_escape_string(strrev(md5($_POST['pass'])+sha1($_POST['pass']))); That's the code I used to encrypt it. MD5 it, SHA1 it, reverse it, and protect it from SQL injections. When it's stored in the database, it come out as: 19 Why is this? En-Psyche Link to comment https://forums.phpfreaks.com/topic/125718-solved-password-system-doesnt-work/ Share on other sites More sharing options...
ohdang888 Posted September 25, 2008 Share Posted September 25, 2008 $fullcode=mysql_real_escape_string(strrev(md5($_POST['pass']).sha1($_POST['pass']))); do not use "+" in php, thats only in javascript Link to comment https://forums.phpfreaks.com/topic/125718-solved-password-system-doesnt-work/#findComment-650059 Share on other sites More sharing options...
corbin Posted September 25, 2008 Share Posted September 25, 2008 Why would you ever display a password publically? Link to comment https://forums.phpfreaks.com/topic/125718-solved-password-system-doesnt-work/#findComment-650080 Share on other sites More sharing options...
EPCtech Posted September 25, 2008 Author Share Posted September 25, 2008 Why would you ever display a password publically? Those are more private reasons. It's for a different project. For security. And for the record, it doesn't matter if you know their password. You can't get into their account via that. It's just an extra security feature. Not on my main website. Link to comment https://forums.phpfreaks.com/topic/125718-solved-password-system-doesnt-work/#findComment-650126 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.