Guest User

Untitled

a guest
Oct 21st, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1.  
  2.  
  3. <?php
  4.  
  5. if(isset($_POST['cambia'])){
  6.  
  7. $parola = FilterText($_POST['lettera']);
  8. $username = FilterText($_POST['nick']);
  9. $password = FilterText($_POST['pass']);
  10.  
  11. $query = mysql_query ("SELECT username FROM users");
  12.  $row = mysql_fetch_array($query);
  13.  $user = $row['username'];
  14.  
  15. if ($user == $nick && $parol == $lettera){
  16.  
  17. mysql_query("UPDATE users SET password = '".$password."' WHERE username = '".$username."'");
  18. echo "<center><font color=green>Password cambiata con Successo</font></font>";
  19.  
  20. } else{
  21.  
  22. echo "<center><font color=red>Username e Frase non corrispondono.</font></center>";
  23.  
  24. }
  25. }
  26.  
  27. ?>
Add Comment
Please, Sign In to add comment