게시물 수정 wirte_update.skin..?
본문
선배님이 기존 게시판을 만들어주셨었는데요.
wr_6까지만 있던것을 제가 wr_7,wr_8을 추가했습니다.
write_update.skin과 write_update를 보았을 때 wr_10까지 추가되어있는것 같아서
따로 안건들였는데
글을 쓰고 다시 write들어가보면 날라가있어서요ㅠ
어떤 것을 만져야 할까요..?도와주십쇼
아래 처럼 wr_7,wr_8을 추가했습니다.
<div class="v_con_wrap spec_wrap">
<p class="title">제품특징</p>
<div class="con_desc">
<div class="con_file active">
<?php echo $view['file'][4]['view']; ?>
</div><!-- con_file -->
<div class="con_txt active">
<?php echo $view['wr_6'] ?>
</div>
</div><!-- con_desc -->
<div class="con_desc">
<div class="con_file active">
<?php echo $view['file'][5]['view']; ?>
</div><!-- con_file -->
<div class="con_txt active">
<?php echo $view['wr_7'] ?>
</div>
</div><!-- con_desc -->
<div class="con_desc">
<div class="con_file active">
<?php echo $view['file'][6]['view']; ?>
</div><!-- con_file -->
<div class="con_txt active">
<?php echo $view['wr_8'] ?>
</div>
</div><!-- con_desc -->
</div><!-- v_con_wrap spec_wrap -->
write_update.php의 일부입니다.
$sql = " insert into $write_table
set wr_num = " . ($w == 'r' ? "'$wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $write_table as sq) ") . ",
wr_reply = '$wr_reply',
wr_comment = 0,
ca_name = '$ca_name',
wr_option = '$wr_option',
wr_subject = '$wr_subject',
wr_content = '$wr_content',
wr_seo_title = '$wr_seo_title',
wr_link1 = '$wr_link1',
wr_link2 = '$wr_link2',
wr_link1_hit = 0,
wr_link2_hit = 0,
wr_hit = 0,
wr_good = 0,
wr_nogood = 0,
mb_id = '{$member['mb_id']}',
wr_password = '$wr_password',
wr_name = '$wr_name',
wr_email = '$wr_email',
wr_homepage = '$wr_homepage',
wr_datetime = '".G5_TIME_YMDHIS."',
wr_last = '".G5_TIME_YMDHIS."',
wr_ip = '{$_SERVER['REMOTE_ADDR']}',
wr_1 = '$wr_1',
wr_2 = '$wr_2',
wr_3 = '$wr_3',
wr_4 = '$wr_4',
wr_5 = '$wr_5',
wr_6 = '$wr_6',
wr_7 = '$wr_7',
wr_8 = '$wr_8',
wr_9 = '$wr_9',
wr_10 = '$wr_10' ";
sql_query($sql);
$sql = " update {$write_table}
set ca_name = '{$ca_name}',
wr_option = '{$wr_option}',
wr_subject = '{$wr_subject}',
wr_content = '{$wr_content}',
wr_seo_title = '$wr_seo_title',
wr_link1 = '{$wr_link1}',
wr_link2 = '{$wr_link2}',
mb_id = '{$mb_id}',
wr_name = '{$wr_name}',
wr_email = '{$wr_email}',
wr_homepage = '{$wr_homepage}',
wr_1 = '{$wr_1}',
wr_2 = '{$wr_2}',
wr_3 = '{$wr_3}',
wr_4 = '{$wr_4}',
wr_5 = '{$wr_5}',
wr_6 = '{$wr_6}',
wr_7 = '{$wr_7}',
wr_8 = '{$wr_8}',
wr_9 = '{$wr_9}',
wr_10= '{$wr_10}'
{$sql_ip}
{$sql_password}
where wr_id = '{$wr['wr_id']}' ";
sql_query($sql);
for ($i=1; $i<=10; $i++) {
$var = "wr_$i";
$$var = "";
if (isset($_POST['wr_'.$i]) && settype($_POST['wr_'.$i], 'string')) {
$$var = trim($_POST['wr_'.$i]);
}
}
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'
where wr_id = '$wr_id' ";
sql_query($sql);
?>
답변을 작성하시기 전에 로그인 해주세요.