묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
소스수정중버그가있어서요
2002.07.11 17:38
소스를 올리빈다.
-----
<?
include "lib.php";
if($j=="" || $j=="u") {
// 같은 메일주소가 있는지 찾는다.
$sql = " select * from $member_table where am_id <> '$am_id' and am_email = '$am_email' ";
if(mysql_num_rows(mysql_query($sql)) > 0) error_msg("같은 E-Mail 주소를 사용하는 회원이 존재합니다.");
$sql = " select * from $member_table where am_id = '$am_id' ";
$result = mysql_query($sql);
}
if($j=="" || $j=="u") {
// 같은 주민번호가 있는지 찾는다.
$sql = " select * from $member_table where am_id <> '$am_id' and am_jumin2 = '$am_jumin2' ";
if(mysql_num_rows(mysql_query($sql)) > 0) error_msg("같은 주민등록번호를 사용하는 회원이 존재합니다.");
$sql = " select * from $member_table where am_id = '$am_id' ";
$result = mysql_query($sql);
}
// $am_birth = strval($am_birth1) . '-' . strval($am_birth2) . '-' . strval($am_birth3);
$am_birth = '2002-01-01';
if($j=="") {
if(mysql_num_rows($result) > 0) error_msg("이미 사용중인 회원아이디 입니다.");
$sql = " insert into $member_table values('$am_id', '$am_pwd', '$am_hint', '$am_re_hint',
'$am_name', '$am_jumin1', '$am_jumin2',
'$am_email', '$am_homepage', '$am_tel', '$am_hp',
'$am_zip1', '$am_zip2', '$am_addr',
'$am_mailling', '$am_common', '$am_birth', '$am_sex', now())";
} else if($j=="u") {
if(mysql_num_rows($result) < 1) error_msg("가입된 회원아이디가 없습니다.");
$sql = " update $member_table
set am_pwd = '$am_pwd',
am_hint = '$am_hint',
am_re_hint = '$am_re_hint',
am_name = '$am_name',
am_jumin1 = '$am_jumin1'+ '+ ',
am_jumin2 = '$am_jumin2',
am_email = '$am_email',
am_homepage= '$am_homepage',
am_tel = '$am_tel',
am_hp = '$am_hp',
am_zip1 = '$am_zip1',
am_zip2 = '$am_zip2',
am_addr = '$am_addr',
am_mailling= '$am_mailling',
am_common = '$am_common',
am_birth = '$am_birth',
am_sex = '+ '$am_sex'
where am_id = '$am_id' ";
} else if($j=="d") {
$sql = " delete from $member_table where am_id='$am_id' ";
}
mysql_query($sql) or die(mysql_error());
echo "<meta http-equiv='refresh' content='0;url=memberr.php?j=$j'>";
?>
----
이건데요
이전 파일에서 입력받아 디비에 저장하는건데요.
이전파일에서
$am_birth1,$am_birth2,$am_birth3를
-----
...
<td> 생년월일</td>
<td>
<input class=frm type=text name=am_birth1 size=4 maxlength=4 value="<?=substr($am_birth,0,4) ?>"
OnChange='chkbirth(this.form)'+ '>년
<input class=frm type=text name=am_birth2 size=2 maxlength=2 value="<?=substr($am_birth,5,2) ?>"
OnChange='chkbirth(this.form)'>월
<input class=frm type=text name=am_birth3 size=2 maxlength=2 value="<?=substr($am_birth,8,2) ?>"
OnChange='chkbirth(this.form)'>일
</td>
....
-----
식으로받아들이거든요
'chkbirth'함수는 아직아무 내용도 없고요
혹시 변수에 연산이안되나싶어서
-----
// $am_birth = strval($am_birth1) . '-' . strval($am_birth2) . '+ '-' . strval($am_birth3);
-----
를 주석처리하고
-----
$am_birth = '2002-01-01';
-----
내용을 넣었거든요
근데 수정(update 테이블)에서는 원하는데로 디비테이블의 'am_birth '항목에 값이들어가는데...
가입시 즉 데이타삽입시(insert 테이블)에는 'am_birth '항목에 값이들어가질않아요.
물론 이를제외한 나머지 항목은 모두 아무이상없이 저장됩니다.
왜그렇죠?
am_birth항목의 변수형은 varchar(10)입니다.
감사하비낟.
-----
<?
include "lib.php";
if($j=="" || $j=="u") {
// 같은 메일주소가 있는지 찾는다.
$sql = " select * from $member_table where am_id <> '$am_id' and am_email = '$am_email' ";
if(mysql_num_rows(mysql_query($sql)) > 0) error_msg("같은 E-Mail 주소를 사용하는 회원이 존재합니다.");
$sql = " select * from $member_table where am_id = '$am_id' ";
$result = mysql_query($sql);
}
if($j=="" || $j=="u") {
// 같은 주민번호가 있는지 찾는다.
$sql = " select * from $member_table where am_id <> '$am_id' and am_jumin2 = '$am_jumin2' ";
if(mysql_num_rows(mysql_query($sql)) > 0) error_msg("같은 주민등록번호를 사용하는 회원이 존재합니다.");
$sql = " select * from $member_table where am_id = '$am_id' ";
$result = mysql_query($sql);
}
// $am_birth = strval($am_birth1) . '-' . strval($am_birth2) . '-' . strval($am_birth3);
$am_birth = '2002-01-01';
if($j=="") {
if(mysql_num_rows($result) > 0) error_msg("이미 사용중인 회원아이디 입니다.");
$sql = " insert into $member_table values('$am_id', '$am_pwd', '$am_hint', '$am_re_hint',
'$am_name', '$am_jumin1', '$am_jumin2',
'$am_email', '$am_homepage', '$am_tel', '$am_hp',
'$am_zip1', '$am_zip2', '$am_addr',
'$am_mailling', '$am_common', '$am_birth', '$am_sex', now())";
} else if($j=="u") {
if(mysql_num_rows($result) < 1) error_msg("가입된 회원아이디가 없습니다.");
$sql = " update $member_table
set am_pwd = '$am_pwd',
am_hint = '$am_hint',
am_re_hint = '$am_re_hint',
am_name = '$am_name',
am_jumin1 = '$am_jumin1'+ '+ ',
am_jumin2 = '$am_jumin2',
am_email = '$am_email',
am_homepage= '$am_homepage',
am_tel = '$am_tel',
am_hp = '$am_hp',
am_zip1 = '$am_zip1',
am_zip2 = '$am_zip2',
am_addr = '$am_addr',
am_mailling= '$am_mailling',
am_common = '$am_common',
am_birth = '$am_birth',
am_sex = '+ '$am_sex'
where am_id = '$am_id' ";
} else if($j=="d") {
$sql = " delete from $member_table where am_id='$am_id' ";
}
mysql_query($sql) or die(mysql_error());
echo "<meta http-equiv='refresh' content='0;url=memberr.php?j=$j'>";
?>
----
이건데요
이전 파일에서 입력받아 디비에 저장하는건데요.
이전파일에서
$am_birth1,$am_birth2,$am_birth3를
-----
...
<td> 생년월일</td>
<td>
<input class=frm type=text name=am_birth1 size=4 maxlength=4 value="<?=substr($am_birth,0,4) ?>"
OnChange='chkbirth(this.form)'+ '>년
<input class=frm type=text name=am_birth2 size=2 maxlength=2 value="<?=substr($am_birth,5,2) ?>"
OnChange='chkbirth(this.form)'>월
<input class=frm type=text name=am_birth3 size=2 maxlength=2 value="<?=substr($am_birth,8,2) ?>"
OnChange='chkbirth(this.form)'>일
</td>
....
-----
식으로받아들이거든요
'chkbirth'함수는 아직아무 내용도 없고요
혹시 변수에 연산이안되나싶어서
-----
// $am_birth = strval($am_birth1) . '-' . strval($am_birth2) . '+ '-' . strval($am_birth3);
-----
를 주석처리하고
-----
$am_birth = '2002-01-01';
-----
내용을 넣었거든요
근데 수정(update 테이블)에서는 원하는데로 디비테이블의 'am_birth '항목에 값이들어가는데...
가입시 즉 데이타삽입시(insert 테이블)에는 'am_birth '항목에 값이들어가질않아요.
물론 이를제외한 나머지 항목은 모두 아무이상없이 저장됩니다.
왜그렇죠?
am_birth항목의 변수형은 varchar(10)입니다.
감사하비낟.
댓글 0
글쓴이 | 제목 | 최종 글 |
---|---|---|
XE | 공지 글 쓰기,삭제 운영방식 변경 공지 [16] | 2019.03.05 by 남기남 |
아이님 | 스케치북 목록형 섬네일 추가 방법 부탁드립니다. [4] | 2016.01.15 by 아이님 |
매드 | 최근게시물 관련 급 문의드립니다... | |
치삼 | 로그인 위젯 스킨이 적용되지 않습니다. | |
gudjd**** | 생성된 레이아웃 편집에 대해 여쭤볼께 있습니다 | |
약방3호 | xeHome - 공지/웹진형에 관해 문의드립니다. | |
2312312432 | DB접속오류 ㅠㅠㅠㅠ도와주세요 | |
2312312432 | 서브메뉴 설정 질문이요 ㅠㅠ도와주세요! [2] | 2016.01.14 by 2312312432 |
ghkdud**** | 익스플로어에서 외부로그인이 안됩니다. [2] | 2016.01.14 by ghkdud**** |
필로스 | 홈페이지 주소로 뜨게하는 설정셋팅방법 [1] | 2016.01.14 by bluedream |
홈런볼11 | 게시글 댓글 첨부 용량 구분하기 [1] | 2016.01.14 by bluedream |
키킥c0302 | 또하나 궁금한점. [1] | 2016.01.14 by DoorWeb |
매드 | xe 문의드립니다. [2] | 2016.01.14 by 매드 |
키킥c0302 | 안녕하세요 다운로드 질문드립니다. [2] | 2016.01.14 by 키킥c0302 |
뀨뀨귱뀨뀨 | xe 설치폴더를 옮기고 싶습니다. [6] | 2016.01.14 by 뀨뀨귱뀨뀨 |
보소보소 | 마켓플레이스 재등록 표시 삭제 방법 [2] | 2016.01.13 by 보소보소 |
I-JEX | DB를 사용하지 않는 게임과 XE의 연동이 가능할까요? [1] | 2016.01.13 by DoorWeb |
핫산123 | 홈페이지 도메인 변경후에 관리자페이지가 안들어가지는대요 [1] | 2016.01.13 by I-JEX |
쭌포토 | Err : '' template file does not exists. 문제 [5] | 2016.01.13 by 쭌포토 |
후니아빠 | "요청한 기능을 실행할 수 있는 권한이 없습니다" - 스마트폰에서 게시판 접속시 | |
아로고 | 게시판 글이 사라졋네요 [3] | 2016.01.13 by 퍼니엑스이 |