Advertisement
Guest User

Untitled

a guest
Dec 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. if ((strlen($haslo1)<6) || (strlen($haslo1)>20))
  2. {
  3. $wszystko_OK=false;
  4. $_SESSION['e_haslo']="Hasło musi posiadać od 6 do 20 znaków!";
  5. }
  6. elseif(!preg_match('/[a-z]+/', $haslo1))
  7. {
  8. $wszystko_OK=false;
  9. $_SESSION['e_haslo']="Hasło musi zawierać co najmniej 1 małą literę";
  10. }
  11. elseif(!preg_match('/[A-Z]+/', $password))
  12. {
  13. $wszystko_OK=false;
  14. $_SESSION['e_haslo']="Hasło musi zawierać co najmniej 1 wielką literę";
  15. }
  16. elseif(!preg_match('/[0-9]+/', $password))
  17. {
  18. $wszystko_OK=false;
  19. $_SESSION['e_haslo']="Hasło musi zawierać co najmniej 1 cyfrę";
  20. }
  21.  
  22. if ($haslo1!=$haslo2)
  23. {
  24. $wszystko_OK=false;
  25. $_SESSION['e_haslo']="Podane hasła nie są identyczne!";
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement