여분필드 값들이 wr_11부터 뿌려지지 않아요.
본문
우선 기본 여분필드인 wr_1부터 wr_10까지는 잘 가져 옵니다. 문제는 wr_11부터인데요.
현재 phpmyadmin에서 필드값은 넉넉히 wr_30까지 생성 완료.
아래 보시다시피 wr_11값부터 뿌려지지 않습니다.
write.php
<table id="customers" cellpadding="0" cellspacing="0" width="100%">
<tr><td width="10%" class="leftsub">방타입1</td>
<td width="40%" class="rightcon"> <input type="text" name="wr_7" id="wr_7" class="info_input" value="<?php echo $write['wr_7']?>" size="70" maxlength="70">
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <input type="text" name="wr_8" id="wr_8" class="info_input" value="<?php echo $write['wr_8']?>" size="15" maxlength="15"> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <input type="text" name="wr_9" id="wr_9" class="info_input" value="<?php echo $write['wr_9']?>" size="10" maxlength="10"> 개</td></tr>
<tr><td width="10%" class="leftsub">방타입2</td>
<td width="40%" class="rightcon"> <input type="text" name="wr_10" id="wr_10" class="info_input" value="<?php echo $write['wr_10']?>" size="70" maxlength="70">
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <input type="text" name="wr_11" id="wr_11" class="info_input" value="<?php echo $write['wr_11']?>" size="15" maxlength="15"> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <input type="text" name="wr_12" id="wr_12" class="info_input" value="<?php echo $write['wr_12']?>" size="10" maxlength="10"> 개</td></tr>
<tr><td width="10%" class="leftsub">방타입3</td>
<td width="40%" class="rightcon"> <input type="text" name="wr_13" id="wr_13" class="info_input" value="<?php echo $write['wr_13']?>" size="70" maxlength="70">
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <input type="text" name="wr_14" id="wr_14" class="info_input" value="<?php echo $write['wr_14']?>" size="15" maxlength="15"> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <input type="text" name="wr_15" id="wr_15" class="info_input" value="<?php echo $write['wr_15']?>" size="10" maxlength="10"> 개</td></tr>
<tr><td width="10%" class="leftsub">방타입4</td>
<td width="40%" class="rightcon"> <input type="text" name="wr_16" id="wr_16" class="info_input" value="<?php echo $write['wr_16']?>" size="70" maxlength="70">
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <input type="text" name="wr_17" id="wr_17" class="info_input" value="<?php echo $write['wr_17']?>" size="15" maxlength="15"> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <input type="text" name="wr_18" id="wr_18" class="info_input" value="<?php echo $write['wr_18']?>" size="10" maxlength="10"> 개</td></tr>
<tr><td width="10%" class="leftsub">방타입5</td>
<td width="40%" class="rightcon"> <input type="text" name="wr_19" id="wr_19" class="info_input" value="<?php echo $write['wr_19']?>" size="70" maxlength="70">
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <input type="text" name="wr_20" id="wr_20" class="info_input" value="<?php echo $write['wr_20']?>" size="15" maxlength="15"> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <input type="text" name="wr_21" id="wr_21" class="info_input" value="<?php echo $write['wr_21']?>" size="10" maxlength="10"> 개</td></tr>
</td>
</tr>
</table>
write.update.skin.php
아래처럼 생성 완료
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$sql = " update $write_table
set wr_11 = '$wr_11',
wr_12 = '$wr_12',
wr_13 = '$wr_13',
wr_14 = '$wr_14',
wr_15 = '$wr_15',
wr_16 = '$wr_16',
wr_17 = '$wr_17',
wr_18 = '$wr_18',
wr_19 = '$wr_19',
wr_20 = '$wr_20',
wr_21 = '$wr_21',
wr_22 = '$wr_22',
wr_23 = '$wr_23',
wr_24 = '$wr_24',
wr_25 = '$wr_25',
wr_26 = '$wr_26',
wr_27 = '$wr_27',
wr_28 = '$wr_28',
wr_29 = '$wr_29',
wr_30 = '$wr_30'
where wr_id = '$wr_id' ";
sql_query($sql);
?>
view.php
<table id="customers" cellpadding="0" cellspacing="0" width="100%">
<tr><td width="10%" class="leftsub">방타입1</td>
<td width="40%" class="rightcon"> <?php echo $view['wr_7']?>
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <?php echo $view['wr_8']?> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <?php echo $view['wr_9']?> 개</td></tr>
<tr><td width="10%" class="leftsub">방타입2</td>
<td width="40%" class="rightcon"> <?php echo $view['wr_10']?>
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <?php echo $view['wr_11']?> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <?php echo $view['wr_12']?> 개</td></tr>
<tr><td width="10%" class="leftsub">방타입3</td>
<td width="40%" class="rightcon"> <?php echo $view['wr_13']?>
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <?php echo $view['wr_14']?> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <?php echo $view['wr_15']?> 개</td></tr>
<tr><td width="10%" class="leftsub">방타입4</td>
<td width="40%" class="rightcon"> <?php echo $view['wr_16']?>
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <?php echo $view['wr_17']?> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <?php echo $view['wr_18']?> 개</td></tr>
<tr><td width="10%" class="leftsub">방타입5</td>
<td width="40%" class="rightcon"> <?php echo $view['wr_19']?>
<td width="10%" class="leftsub">가격</td>
<td width="20%" class="rightcon"> <?php echo $view['wr_20']?> PHP(페소)</td>
<td width="10%" class="leftsub">방갯수</td>
<td width="10%" class="rightcon"> <?php echo $view['wr_21']?> 개</td></tr>
</td>
</tr>
</table>
쓰기에서 설정 완료, 쓰기 업데이트스킨에서 완료, 뷰페이지에서 받았을때 wr_11 부터 뿌려지지 못합니다. 고수님들 좀 도와주세요 ㅜ.ㅜ
!-->답변 7
아 카톡주십시오 봐드릴께요 lemontree4050
일단 phpmyadmin 에서 필드에 값이 들어가는지 부터 확인 하세요~
일단 들어가면 그 다음에는 view 문제겠죠
안들어가면 write 랑 write.update. 문제일꺼고요~
그렇다면
sql문을 쿼리로 찍고
exit하신후 직접 db 관리자에서 실행해보십시오 잘실행되는지..
재아님 답변 감사합니다. phpmyadmin 필드는 이미생성 해놓았어요.
이건 list나 view페이지에서 wr_11부터 없어서 그렇습니다.
select wr_11~ 쭉 넣어보세요 아마 wr_10까지 있을겁니다.
/bbs/list.php 와 /bbs/view.php 에 select부분보세요 들어는갔는데 select가 안되는거 같습니다.
새해라 그런지 안되네요.
오타인가요?
write.update.skin.php
파일명은 위가 아니라 이렇게 하셔야 합니다.
write_update.skin.php
답변을 작성하시기 전에 로그인 해주세요.