[g5] 회원가입시 아이디 중복검사하기 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[g5] 회원가입시 아이디 중복검사하기

페이지 정보

본문

 

skin/member/basic/register_form.skin.php

 

<form id="fregisterform" name="fregisterform" action="<?php echo $register_action_url ?>" onsubmit="return fregisterform_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="mb_id_enabled" id="mb_id_enabled" value="1">

중략 

<?php if ($w == "") { ?><span><button type="button" class="btn_frmline" onclick="mbid_check(document.all.mb_id.value)">중복검사</button></span><? } ?>
중략
<script>

function mbid_check(id)
{
if (!id) {
    alert('아이디를 입력하십시오.');
    f.mb_id.focus();
    return;
}

$.post(
    "./member_id_check.php",
    { mb_id: id },
    function(data) {
    if(data.name) {
        alert("사용할수 없는 아이디입니다.");
        return false;
    } else {
        alert("사용가능한 아이디입니다.");
        document.fregisterform.mb_id_enabled.value = '';
    }
    }, "json"
);
}

// submit 최종 폼체크
function fregisterform_submit(f)
{

    if (f.w.value == "") {
    if (f.mb_id_enabled.value == 1) {
        alert("아이디 중복검사를 하셔야 합니다.");
        return false;
    }
    }

</script>

 

 

bbs/member_id_check.php

<?php
include_once("./_common.php");

$mb_id = trim($mb_id);
$name = '';

$sql = " select * from {$g5['member_table']} where mb_id = '$mb_id' ";
$row = sql_fetch($sql);
$code = $row['mb_id'];
$name = $row['mb_name'];

echo '{ "code": "' . $code . '", "name": "' . $name . '" }';
?> 

 

 

추천0

댓글목록

등록된 댓글이 없습니다.

Total 825건 5 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
745 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18966 0 12-22
744 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16336 0 12-18
743 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14247 0 12-02
742 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9174 0 10-22
741 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10239 0 08-21
740 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10050 0 08-15
739 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10069 0 08-12
738 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8992 0 06-14
737 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9630 0 06-09
736 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9835 0 04-25
735 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9064 0 04-20
734 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8857 0 03-30
733 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8412 0 12-05
732 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8906 0 12-04
731 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 10070 0 08-18
730 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9176 0 07-14
729 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8977 0 07-10
728 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11046 0 04-08
727 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9000 0 03-15
726 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9380 0 01-25

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
2,124
어제
4,566
최대
6,509
전체
1,066,785
Copyright (c) 株式会社YHPLUS. All rights reserved.