tuxbuddy Posted May 7, 2008 Share Posted May 7, 2008 I have written a login script during the user inputs it shows the password being written in plain text.I want to write it in dot-dot or encryted way as usual website has. How can I do that?? Quote Link to comment Share on other sites More sharing options...
Coreye Posted May 7, 2008 Share Posted May 7, 2008 I have written a login script during the user inputs it shows the password being written in plain text.I want to write it in dot-dot or encryted way as usual website has. How can I do that?? <input type='password' name='password' size='25' /> Quote Link to comment Share on other sites More sharing options...
Psycho Posted May 7, 2008 Share Posted May 7, 2008 Note that making the field a "password" field only masks the password on screen when enetered. It is still sent in plain text when submitted. You would need to hash/encrypt the password when recived before creating the DB record. Quote Link to comment Share on other sites More sharing options...
947740 Posted May 7, 2008 Share Posted May 7, 2008 If you want to use md5() before you enter the password in the database, use: <?php $password = md5($_POST['password']); ?> Quote Link to comment Share on other sites More sharing options...
redarrow Posted May 7, 2008 Share Posted May 7, 2008 <?php $password_decripted="redarrow"; $password=$password_decripted; $password_encripted=md5($_POST['password']); echo"password was encripted with md5 $password_encripted <br><br> password not encripted: $password"; ?> 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.