aeris130 Posted March 24, 2006 Share Posted March 24, 2006 Suppose I have the following query:[code]SELECT * FROM users WHERE username='My_user' AND password='my_password'[/code]Now, since my passwords are encrypted in md5, the only way to type them in like this would be to use their decrypted form. Is there any way to decrypt "my_password" before comparing it to the database? Quote Link to comment Share on other sites More sharing options...
holowugz Posted March 24, 2006 Share Posted March 24, 2006 md5 are one way encryption so:$username = $_POST['username'];$my_password = md5($_POST['password']);SELECT * FROM users WHERE username='$username AND password='$my_password' Quote Link to comment Share on other sites More sharing options...
aeris130 Posted March 24, 2006 Author Share Posted March 24, 2006 Ah, thanks a lot. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.