Subversion Repositories taios

Rev

Rev 169 | Rev 355 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

require '_taios.php';
require_once '_recaptchalib.php';

$page = new Taios_Page('Login');

$username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$name = $_POST['name'];

if (empty($username))
{
    $page->redirect('register.php?error=No Username Specified');
}
if (empty($password))
{
    $page->redirect('register.php?error=No Password Specified');
}
if (empty($password2))
{
    $page->redirect('register.php?error=No Repeat Password Specified');
}
if ($password != $password2)
{
    $page->redirect('register.php?error=Passwords do not match');
}

$page->query('INSERT INTO Users (AccessID, Username, Password, EmailAddress, Name, ChallengeID) VALUES (2, "' . $username . '", "' . sha1($password) . '", "' . $email . '", "' . $name . '", 0)');

$page->redirect('login.php');

?>