Page 1 of 1

Having problems with a signup form

Posted: Tue Feb 10, 2009 4:24 am
by Edso
$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

Re: Having problems with a signup form

Posted: Tue Feb 10, 2009 8:40 am
by Skoalbasher
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 />');
}