view페이지에서 내용수정 도와주
본문
view.skin.php 코드를 아래처럼 수정
<form name="fwrite" id="fwrite" action="<?php echo $board_skin_url?>/view_update.php" onsubmit="return fwrite_submit(this);" method="post">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">
<div class="write_div" style="margin-top:12px;">
<div style="margin-bottom:20px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border: 1px solid #ccc;">
<tr>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">구매수수료</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_21" value="<?php echo $wr_21 ?>" id="wr_21" class="frm_input full_input" size="5" maxlength="255"></td>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">현지배송비</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_22" value="<?php echo $wr_22 ?>" id="wr_22" class="frm_input full_input" size="5" maxlength="255"></td>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">현지세금</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_23" value="<?php echo $wr_23 ?>" id="wr_23" class="frm_input full_input" size="5" maxlength="255"></td>
</tr>
<tr>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">송금수수료</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_24" value="<?php echo $wr_24 ?>" id="wr_24" class="frm_input full_input" size="5" maxlength="255"></td>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">기타금액</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_25" value="<?php echo $wr_25 ?>" id="wr_25" class="frm_input full_input" size="5" maxlength="255"></td>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">적용환율</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_26" value="<?php echo $wr_26 ?>" id="wr_26" class="frm_input full_input" size="5" maxlength="255"></td>
</tr>
<tr>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">제품가격</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_27" value="<?php echo $wr_27 ?>" id="wr_27" class="frm_input full_input" size="5" maxlength="255"></td>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">물류비</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_28" value="<?php echo $wr_28 ?>" id="wr_28" class="frm_input full_input" size="5" maxlength="255"></td>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">총결제금액</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_29" value="<?php echo $wr_29 ?>" id="wr_29" class="frm_input full_input" size="5" maxlength="255"></td>
</tr>
<tr>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">송장번호</td>
<td style="text-align:left; padding:10px;"><input type="text" name="wr_30" value="<?php echo $wr_30 ?>" id="wr_30" class="frm_input full_input" size="5" maxlength="255"></td>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">결제일</td>
<td style="text-align:left; padding:10px;"><?php echo date("y-m-d H:i", strtotime($view['wr_20']))?></td>
<td style="background-color:#fbfbfb; line-height:16px; padding:10px;">구매일</td>
<td style="text-align:left; padding:10px;"><?php echo date("y-m-d H:i", strtotime($view['wr_datetime']))?></td>
</tr>
</table>
</div>
<button type='submit' id='btn_submit' accesskey='s' class='btn_submit btn' style='margin:-8px 0 0 5px'>상태변경</button>
</div>
</form>
view.update.php 코드를 아래처럼 수정
<?php
include_once('../../common.php');
$update_sql = " update $write_table
set 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($update_sql);
goto_url(G5_URL.'/'.$write_table.'/'.$wr_id);
?>
위에철 햇는데 작동이 않됩니다.
고수님 도와주세요 감사합니다.
답변 2
작동이 왜안되는지.. 파악을 하셔야죠
일단 include 부터 문제인게 제일 큽니다.
view.update.php => view.tail.skin.php
view.update.php는 없습니다.