여분필드 사용법에 대해서 채택완료
댓글에 여분필드를 사용하려고 아래와 같이 했습니다. 그런데, DB에 값이 들어가지가 않아서요.
입력폼을 하나씩 만들어야 하는 것인지... ;; 부탁드립니다.
view_comment_skin.php 에 아래와 같이 추가했습니다.
for($korb = 1 ; $korb < 21; $korb++) " style="width:20px; height:20px;">
그리고 write_comment_update.skin.php에 아래와 같이 추가했습니다.
// 자신만의 코드를 넣어주세요. sql_query($sql12); set kor_1 = '$kor_1', kor_2 = '$kor_2', kor_3 = '$kor_3', kor_4 = '$kor_4', kor_5 = '$kor_5', kor_6 = '$kor_6', kor_7 = '$kor_7', kor_8 = '$kor_8', kor_9 = '$kor_9', kor_10 = '$kor_10', kor_11 = '$kor_11', kor_12 = '$kor_12', kor_13 = '$kor_13', kor_14 = '$kor_14', kor_15 = '$kor_15', kor_16 = '$kor_16', kor_17 = '$kor_17', kor_18 = '$kor_18', kor_19 = '$kor_19', kor_20 = '$kor_20'
where wr_id = '$wr_id' "; sql_query($sql12);
답변 2개
update 테이블명 set
set kor_1 = '$kor_1',
kor_2 = '$kor_2', kor_3 = '$kor_3', kor_4 = '$kor_4', kor_5 = '$kor_5', kor_6 = '$kor_6', kor_7 = '$kor_7', kor_8 = '$kor_8', kor_9 = '$kor_9', kor_10 = '$kor_10', kor_11 = '$kor_11', kor_12 = '$kor_12', kor_13 = '$kor_13', kor_14 = '$kor_14', kor_15 = '$kor_15', kor_16 = '$kor_16', kor_17 = '$kor_17', kor_18 = '$kor_18', kor_19 = '$kor_19', kor_20 = '$kor_20'
where wr_id = '$wr_id' ";
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
<tr><td align="center" width="25px" height="20px"><input type="text" name="kor_1" itemname="kor_1" value="<?php if($w=="u"){echo $write['kor_1'];} ?>" style="width:20px; height:20px;"></td></tr>
<tr><td align="center" width="25px" height="20px"><input type="text" name="kor_2" itemname="kor_2" value="<?php if($w=="u"){echo $write['kor_2'];} ?>" style="width:20px; height:20px;"></td></tr>