Rev 169 | Rev 354 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 169 | tom | 1 | <?php |
| 2 | |||
| 3 | require '_taios.php'; |
||
| 348 | tom | 4 | require_once '_recaptchalib.php'; |
| 169 | tom | 5 | |
| 6 | $page = new Taios_Page('Login'); |
||
| 7 | |||
| 8 | $username = $_POST['username']; |
||
| 9 | $password = $_POST['password']; |
||
| 10 | $password2 = $_POST['password2']; |
||
| 11 | $email = $_POST['email']; |
||
| 12 | $name = $_POST['name']; |
||
| 13 | |||
| 14 | if (empty($username)) |
||
| 15 | { |
||
| 16 | $page->redirect('register.php?error=No Username Specified'); |
||
| 17 | } |
||
| 18 | if (empty($password)) |
||
| 19 | { |
||
| 20 | $page->redirect('register.php?error=No Password Specified'); |
||
| 21 | } |
||
| 22 | if (empty($password2)) |
||
| 23 | { |
||
| 24 | $page->redirect('register.php?error=No Repeat Password Specified'); |
||
| 25 | } |
||
| 26 | if ($password != $password2) |
||
| 27 | { |
||
| 28 | $page->redirect('register.php?error=Passwords do not match'); |
||
| 29 | } |
||
| 30 | |||
| 31 | $page->query('INSERT INTO Users (AccessID, Username, Password, EmailAddress, Name, ChallengeID) VALUES (2, "' . $username . '", "' . sha1($password) . '", "' . $email . '", "' . $name . '", 0)'); |
||
| 32 | |||
| 33 | $page->redirect('login.php'); |
||
| 34 | |||
| 35 | ?> |