Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. $reg_login = '/^[a-z0-9_-]{3,16}$/';
  2. $reg_password = '/^[a-z0-9_-]{3,16}$/';
  3. //logowanie
  4. session_start();
  5. if (isset($_REQUEST['zaloguj'])) {
  6. $login = $_REQUEST['login'];
  7. $haslo = $_REQUEST['password'];
  8.  
  9. try {
  10. if (filter_var($login, FILTER_VALIDATE_REGEXP, array(
  11. "options" => array("regexp" => $reg_login))) &&
  12. filter_var($haslo, FILTER_VALIDATE_REGEXP, array(
  13. "options" => array("regexp" => $reg_password)))) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement