emailAddress==""){ $errors++; $msg.="You must enter your email address
"; } if ($post->emailAddress !=$post->confirmEmailAddress){ $errors++; $msg.="The email addresses you entered did not match
"; } // let's make sure that we don't have this person already. if ($errors==0){ if($db->getOne("SELECT count(user_id) FROM users WHERE emailAddress='$post->emailAddress'")>0){ print<<Error

We already have an account associated with that email address.

If you would like to change your information, please sign in to do so.

If you've forgotten your password, let us mail your password to you. eof; include("inc/foot.php"); exit; } } if ($post->userFirstname==""){ $errors++; $msg.="You must enter your first name
"; } if ($post->userLastname==""){ $errors++; $msg.="You must enter your last name
"; } if ($post->userPassword==""){ $errors++; $msg.="You must enter a password
"; } if ($post->userPassword !=$post->confirmUserPassword){ $errors++; $msg.="The passwords you entered did not match
"; } if($post->address1==""){ $errors++; $msg.="You must enter an address
"; } if ($post->city ==""){ $errors++; $msg.="You must enter a city
"; } if ($post->state ==""){ $errors++; $msg.="You must enter a state/province
"; } if ($post->zip ==""){ $errors++; $msg.="You must enter a postal code
"; } if ($errors!=0){ print<<Error

The following error(s) occured while trying to process your request. Please review your errors, make your corrections and click "Submit" to continue.

$msg

eof; $newaction=$post->action; $row = $post; include("inc/userForm.php"); include("inc/foot.php"); exit; } $user = new user($db,$config,"user"); $_POST["addressFirstname"] = $_POST["userFirstname"]; $_POST["addressLastname"] = $_POST["userLastname"]; $_POST["addressMiddlename"] = $_POST["userMiddlename"]; $_POST["addressPhone"] = $_POST["userPhone"]; $_POST["addressPhoneExt"] = $_POST["userPhoneExt"]; $_POST["addressFax"] = $_POST["userFax"]; $user->saveUser($_POST); $user->saveAddress($_POST,$user->user_id,"Primary"); // welcome letter... $emailSubject = "Welcome to {$config[siteShortURL]}"; $emailBody.=<<userFirstname $post->userLastname, Thank you for registering at {$config["siteShortURL"]}. You can now enjoy all the member benefits included in your membership. Your login information is below and you can always edit this information once you're signed into {$config["siteShortURL"]} by clicking on the "Edit Profile" link. Username: $post->emailAddress Password: $post->userPassword Thanks again for joining! {$config["siteName"]} eof; $user->sendUserEmail($user->user_id,$emailSubject,$emailBody); print<<Registration Successful

Thank you for registering at {$config[siteName]}.

You can now sign in by going to our sign in page.

eof; $user->printUserInfo($user->user_id,"Y"); break; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //default ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// default: print<<Join {$config[siteName]}

Use the form below to register with {$config[siteName]}.

Fill out the form below and click "Submit" to continue.

eof; $newaction="insertuser"; include("forms/userForm.php"); break; } include("inc/foot.php"); ?>