이메일 로그인 에러 관련
본문
Cannot redeclare valid_mb_id() (previously declared in /home/tnhands/public_html/board/lib/register.lib.php:15) in /home/tnhands/public_html/board/lib/register.lib.php on line 29
무엇때문에 에러가 뜨는건가요?
이렇게 해놨는데
function valid_mb_id($reg_mb_id)
{
if (preg_match("/[^0-9a-z_]+/i", $reg_mb_id))
return "회원아이디는 영문자, 숫자, _ 만 입력하세요.";
else
return "";
<tbody>
<tr>
<th scope="row"><label for="reg_mb_id">아이디<strong class="sound_only">필수</strong></label></th>
<td>
<span class="frm_info">이메일을 입력하세요 입력하세요.</span>
<input type="text" name="mb_id" value="<?php echo $member['mb_id'] ?>" id="reg_mb_id" <?php echo $required ?> <?php echo $readonly ?> class="frm_input <?php echo $required ?> <?php echo $readonly ?>" minlength="3" maxlength="40" size="40">
<span id="msg_mb_id"></span>
</td>
</tr>
<tr>
<th scope="row"><label for="reg_mb_password">비밀번호<strong class="sound_only">필수</strong></label></th>
<td><input type="password" name="mb_password" id="reg_mb_password" <?php echo $required ?> class="frm_input <?php echo $required ?>" minlength="3" maxlength="20" size="40"></td>
</tr>
}
function valid_mb_id($reg_mb_id)
{
if (!ereg("(^[_0-9a-zA-Z-]+(\.[_0-9a-zA-Z-]+)*@[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*$)", $reg_mb_id))
return "아이디로 이메일을 입력하여 주십시오.";
else
return "";
}