[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건 1 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
825 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 718 0 11-02
824 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 952 0 07-10
823 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1948 0 04-06
822 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1804 0 02-21
821 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1694 0 12-31
820 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1774 0 12-24
819 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1774 0 12-04
818 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1851 0 10-17
817 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1807 0 10-02
816 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1733 0 08-04
815 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1500 0 08-04
814 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1831 0 08-03
813 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2138 0 07-08
812 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2079 0 07-08
811 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 3164 0 07-06
810 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1727 0 06-09
809 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2157 0 06-03
808 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 1951 0 04-16
807 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2223 0 03-29
806 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 2149 0 03-26

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
4,740
어제
4,566
최대
6,509
전체
1,069,401
Copyright (c) 株式会社YHPLUS. All rights reserved.