Guest User

Untitled

a guest
Apr 16th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <?php
  2.  
  3. // you get this from the login creation form
  4. $mypass = "godftw";
  5. $encryptedpass = md5($mypass);
  6.  
  7. // store $encryptedpass in the database
  8.  
  9.  
  10.  
  11.  
  12. **
  13.  
  14.  
  15. so mr herp derp comes to login
  16.  
  17. $username = "herpderp";
  18. $mypass = "godftw";
  19.  
  20. // "ok lets check if its right"
  21.  
  22. $encrpyt = md5($mypass);
  23.  
  24. // run query, where pass = encrpyt and username = herpderp
  25. // if the $mypass was different, the encrpytion is difference, so it will fail
  26.  
  27. ?>
Add Comment
Please, Sign In to add comment