/**
* Register.php
*
* Displays the registration form if the user needs to sign-up,
* or lets the user know, if he's already logged in, that he
* can't register another name.
*
* Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
* Last Updated: August 19, 2004
*/
include("include/session.php");
?>
Level One - Technology Simplfied
/**
* The user is already logged in, not allowed to register.
*/
if($session->logged_in){
echo "Registered
";
echo "We're sorry $session->username, but you've already registered. "
."Main.
";
}
/**
* The user has submitted the registration form and the
* results have been processed.
*/
else if(isset($_SESSION['regsuccess'])){
/* Registration was successful */
if($_SESSION['regsuccess']){
echo "

You have successfully registered!
";
echo "
Thank you ".$_SESSION['reguname'].", your information has been added to the database,
"
."
you may now log in.
";
}
/* Registration failed */
else{
echo "Registration Failed
";
echo "We're sorry, but an error has occurred and your registration for the username ".$_SESSION['reguname'].", "
."could not be completed.
Please try again at a later time.
";
}
unset($_SESSION['regsuccess']);
unset($_SESSION['reguname']);
}
/**
* The user has not filled out the registration form yet.
* Below is the page with the sign-up form, the names
* of the input fields are important and should not
* be changed.
*/
else{
?>


Register
if($form->num_errors > 0){
echo "
".$form->num_errors." error(s) found
";
}
?>
}
?>