$preg = getLoginRegex();
if (!preg_match($preg, $vars['login'])){
$error[] = $config['login_disallow_spaces'] ?
_SIGNUP_INVALID_USERNAME_W_SPACES : _SIGNUP_INVALID_USERNAME;
} elseif (strlen($vars['login']) < $config['login_min_length']){
$error[] = sprintf(_SIGNUP_INVALID_USERNAME_2,$config['login_min_length']);
} elseif (!$member_id=$db->check_uniq_login($vars['login'], $vars['email'],
$vars['pass0'], 1)){
$error[] = sprintf(_SIGNUP_INVALID_USERNAME_3,$vars[login]);
}
if (!check_email($vars['email'])){
$error[] = _SIGNUP_PLEASE_ENTER_EMAIL;
} elseif (($config['unique_email'] && $member_id <= 0) &&
$db->users_find_by_string($vars['email'], 'email', 1)){
$error[] = _SIGNUP_INVALID_EMAIL_1.'<br />'.sprintf(_SIGNUP_INVALID_EMAIL_2,'<a href="member.php">','</a>','<br />');
}
where could be the error guys please help me.
Thanks
Ed
Having problems with a signup form
Moderator: General Moderators
- Skoalbasher
- Forum Contributor
- Posts: 147
- Joined: Thu Feb 07, 2008 8:09 pm
Re: Having problems with a signup form
What's supposed to happen here, and what doesn't work about it? Does it give you an error? Does it email to the wrong spot and it gets spit back? Also try and put your code in the code tags.
Code: Select all
$preg = getLoginRegex();
if (!preg_match($preg, $vars['login'])){
$error[] = $config['login_disallow_spaces'] ?
_SIGNUP_INVALID_USERNAME_W_SPACES : _SIGNUP_INVALID_USERNAME;
} elseif (strlen($vars['login']) < $config['login_min_length']){
$error[] = sprintf(_SIGNUP_INVALID_USERNAME_2,$config['login_min_length']);
} elseif (!$member_id=$db->check_uniq_login($vars['login'], $vars['email'],
$vars['pass0'], 1)){
$error[] = sprintf(_SIGNUP_INVALID_USERNAME_3,$vars[login]);
}
if (!check_email($vars['email'])){
$error[] = _SIGNUP_PLEASE_ENTER_EMAIL;
} elseif (($config['unique_email'] && $member_id <= 0) &&
$db->users_find_by_string($vars['email'], 'email', 1)){
$error[] = _SIGNUP_INVALID_EMAIL_1.'<br />'.sprintf(_SIGNUP_INVALID_EMAIL_2,'<a href="member.php">','</a>','<br />');
}