1. Jak widzicie jeśli nie wypełnie wszystkich pól to powinien się pojawić napis "Please fill in all fields". Na filmiku to działa a u mnie nic się nie dzieje.
CODE<?php if ($submit) { //check for existance if ($yourname&&$username&&$password&&$repeatpassword) { } else } ?> <html> <p> <form action='register.php' method='POST'> <table> <tr> <td> Your name: </td> <td> <input type='text' name='yourname'> </td> </tr> <tr> <td> Choose a username: </td> <td> <input type='text' name='username'> </td> </tr> <tr> <td> Choose a password: </td> <td> <input type='password' name='password'> </td> </tr> <tr> <td> Repeat your password: </td> <td> <input type='password' name='repeatpassword'> </td> </tr> </table> <p> <input type='submit' name='submit' value='Register'> </form> </html>
2. "Please fill..." nie działa, ale robię dalej i tu już wywala Parse error: syntax error, unexpected T_ELSE in .... on line 29. Wydaje mi się, że dobrze wszystko przepisałem.
CODE<?php if ($submit) { //check for existance if ($yourname&&$username&&$password&&$repeatpassword) { //encrypt password if ($password==$repeatpassword) { //check character lenght of name and username { } else { //check password lenght { } else { //register the user! } } } else } else } ?>
Chciałbym dokończyć ten tutorial, ale utknąłem na tym.