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 https://forums.phpfreaks.com/topic/5709-md5-query/ 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 https://forums.phpfreaks.com/topic/5709-md5-query/#findComment-20359 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 https://forums.phpfreaks.com/topic/5709-md5-query/#findComment-20362 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.