<form id="registerForm" method="post" action="index.php?task=registerContinue"> <label>Podaj swój przyszły login (będzie potrzebny do zalogowania się do gry):</label> <input name="login" type="text"/> <label>Podaj swój przyszły nick (będzie reprezentował cię wśród innych graczy, świetnie jeżeli nick ma sens, bo jest później wykorzystywany w dalszej grze (lepiej zamiast Sfsfsdf nazwać się Sherlock Holmes)):</label> <input name="name" type="hidden" /> <input name="nick" type="text"/> <label>Podaj swoje hasło:</label> <input type="password" id="passw" name="password"/> <label>Powtórz hasło:</label> <input type="password" name="retype" /> <label>Wybierz z listy swoją płeć</label> <select name="sex"> <option value="0">Jestem mężczyzną</option> <option value="1">Jestem kobietą</option> </select> <label>Przepisz kod z obrazka: </br><img src="http://127.0.0.1/charles/tpl/../safe.php" /> </label> <input class="field" type="text" name="captcha" maxlength="4" /> <label>Akceptuje regulamin serwisu oraz zobowiązuje się przestrzegać jego postanowień.</label> <input type="checkbox" id="agree" name="agree" value="1" /></br> <input type="submit" value="Zarejestruj!" /> </form> <script> $(function() { $("#registerForm").validate({ rules: { login: { required:true, rangelength: [4,20], remote:"look.php" }, nick : { required:true, rangelength:[4,20], remote:"look.php" }, password: { required:true, rangelength:[5,30] }, retype: { required:true, equalTo:"#passw" }, captcha:{ rangelength:[4,4], remote: "look.php", required:true, }, agree:{ required:true } }, messages:{ login:{ required:"To pole jest wymagane!", rangelength: "Login musi składać się z 4 do 20 znaków!", remote:"Podany przez ciebie login jest zajęty! Spróbuj inny." }, nick:{ required:"To pole jest wymagane!", rangelength: "Nick musi składać się z 4 do 20 znaków!", remote:"Podany przez ciebie nick jest zajęty! Spróbuj inny." }, password:{ required:"To pole jest wymagane!", rangelength: "Hasło musi składać się z 5 do 30 znaków!" }, captcha:{ rangelength:"Źle przepisany kod CAPTCHA", remote: "Źle przepisany kod CAPTCHA!", required:"To pole jest wymagane!", }, retype:{ required:"To pole jest wymagane!", equalTo:"Wpisane przez ciebie hasła nie są identyczne!" }, agree:{ required:"Przed kontynuowaniem musisz zaakceptować nasz regulamin!" } } }) }); </script>