Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Problem z zmianą hasła
Otto
post
Post #1





Grupa: Zarejestrowani
Postów: 144
Pomógł: 7
Dołączył: 22.03.2010

Ostrzeżenie: (0%)
-----


Witam mam taki irytujący problem z zmianą hasła... Mianowicie mam hasło kodowane w md5 jednak md5 koduje tez pustą zmienną i przez to nie mogę zrobić by gdy stare hasło, nowe hasło oraz powtórzone nowe hasło nie zostanie podane nie zmienni hasła...
  1.  
  2. $o_pass = $r['pass'];
  3. $n_pass = md5($haslo0);
  4.  
  5. if (empty($haslo0) && empty($haslo1) && empty($haslo2)) {
  6. $haslo = $o_pass;
  7. } else {
  8.  
  9. if (!empty($haslo0)) {
  10. if ($n_pass != $o_pass) {
  11. die(header('location:/edytuj_profil.php?error=2'));
  12. }
  13. if (empty($haslo1) || empty($haslo2)) {
  14. die(header('location:/edytuj_profil.php?error=7'));
  15. }
  16.  
  17. if ($haslo1 != $haslo2) {
  18. die(header('location:/edytuj_profil.php?error=8'));
  19. }
  20. }
  21. }


Ten post edytował Otto 20.10.2010, 16:37:06
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 23:23