} else { if (!$validate->checkFieldLength($password1, 8)) { $messages->addError('Password must be eight characters or greater.'); } else { if (!$validate->feildsAreTheSame($password1, $password2)) { $messages->addError('Passwords must match.'); } } } if ($messages->hasErrors()) { $messages->displayErrorMsgs(); include './signup.php'; exit; } } if ($database->insertNewUser($email, $password1, $passwordhint)) { $_SESSION['email'] = $email; $_SESSION['pass'] = sha1($password1); $_SESSION['link'] = sha1($email); } else { $_SESSION['email'] = $email; $_SESSION['problem'] = ' database INSERT.'; header('Location: oops.php'); } if ($database->newSignupEmail()) { header('Location: emailverify.php'); } else { $_SESSION['email'] = $email; $_SESSION['problem'] = ' verification email.'; header('Location: oops.php'); }