Hello,
I've said this before, but I'm not really a coder.
Anyway, I'm trying to create user accts using .php and mysql.
I'm following this tut: http://www.tutorialized.com/view/tut...Tutorial/62385
and it shows up on the page without a problem, however when I do a test registration I get "Invalid email address", which of course it is not.
I think this is the problem section.
PHP Code:if(isset($_POST['registerSubmit']) && $_POST['registerSubmit'] == 'true'){
$registerEmail = trim($_POST['email']);
$registerPassword = trim($_POST['password']);
$registerConfirmPassword = trim($_POST['confirmPassword']);
if (!eregi("^[_a-z0-9-] (.[_a-z0-9-] )*@[a-z0-9-] (.[a-z0-9-] )*(.[a-z]{2,3})$", $registerEmail))
$errors['registerEmail'] = 'Your email address is invalid.';
if(strlen($registerPassword) < 6 || strlen($registerPassword) > 12)
$errors['registerPassword'] = 'Your password must be between 6-12 characters.';
if($registerPassword != $registerConfirmPassword)
$errors['registerConfirmPassword'] = 'Your passwords did not match.';
I'm not going to post the link but by chance if you think it will help, let me know. Thanks for the help in advance, and if you need anymore info let me know.HTML Code:<h2>Register</h2> <?php if($success['register']) print '<div class="valid">' . $success['register'] . '</div>'; ?> <?php if($errors['register']) print '<div class="invalid">' . $errors['register'] . '</div>'; ?> <label for="email">Email Address</label> <input type="text" name="email" value="<?php echo htmlspecialchars($registerEmail); ?>" /> <?php if($errors['registerEmail']) print '<div class="invalid">' . $errors['registerEmail'] . '</div>'; ?>



Reply With Quote
Bookmarks