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