Guest User

Untitled

a guest
Dec 9th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <?php
  2.  
  3. if($_POST) {
  4. $username = $_POST["username"];
  5. $password = $_POST["password"];
  6. $confirm_password = $_POST["confirm_password"];
  7.  
  8. if(empty($passowrd) || empty($confirm_password) || empty($username)) {
  9. exit("Blank fields.");
  10. }
  11.  
  12. if($password != $confirm_password) {
  13. exit("Passwords do not match.");
  14. }
  15.  
  16. $password = hash('whirlpool', $data);
  17.  
  18. mysql_query("UPDATE `users` SET `password`='$password' WHERE `username`='$username'");
  19.  
  20. }
  21. ?>
  22.  
  23. <form name="testing" method="post" action="test.php">
  24. <label for="username">Username:</label> <input type="text" name="username" /><br />
  25. <label for="password">New Password:</label> <input type="text" name="password" /><br />
  26. <label for="confirm_password">Confirm New Password:</label> <input type="text" name="confirm_password" /><br /><br />
  27.  
  28. <input type="submit" value="Submit" name="submit" />
  29. </form>
Add Comment
Please, Sign In to add comment