$reason_text = "Identyfikator musi mieć od 5 do 15 znaków"; } elseif (strcmp($login, $login2) != 0) { $reason_text = "Identyfikator może zawierać tylko litery i cyfry"; } elseif (strcmp($password, $password2) != 0) { $reason_text = "Pola haseł nie zgadzają się"; } else { $db = new Database(); $rowUser = $db->getUser($login, NULL); if ($rowUser != NULL) { $reason_text = "Użytkownik o podanym identyfikatorze już istnieje"; } else { $rowUser = $db->addUser($login, $password); $uid = $rowUser['id']; $isAllowed = TRUE; $sid = getCode(); if ($db->updateUserSid($uid, $sid) == FALSE) { $reason_text = "Undefined error"; $isAllowed = FALSE; } trigger_error("login:"******" password(" . $rowUser['password'] . "):" . $password . "uid:" . $uid . " sid" . $sid, E_USER_NOTICE); } $db->destroy(); } } $wap_title = "mobiKAR - login"; include "add_head.php"; if ($isAllowed == FALSE) { ?> <h1>Nowe konto</h1> <div> <?php