답변 3개 / 댓글 3개
채택된 답변
+20 포인트
조건에 마춰서
테이블을 미리 지정해 두고
bbs/move_update.php
파일을 구동시키면 되겠습니다..
테이블을 미리 지정해 두고
bbs/move_update.php
파일을 구동시키면 되겠습니다..
move_update.php
을 보시면 submit 될때 넘기는 값이..
<input type='hidden' name='sw' value='<?php echo $sw?>' />
<input type='hidden' name='bo_table' value='<?php echo $bo_table?>' />
<input type='hidden' name='wr_id_list' value='<?php echo $wr_id_list?>' />
<input type='hidden' name='sfl' value='<?php echo $sfl?>' />
<input type='hidden' name='stx' value='<?php echo $stx?>' />
<input type='hidden' name='spt' value='<?php echo $spt?>' />
<input type='hidden' name='page' value='<?php echo $page?>' />
<input type='hidden' name='act' value='<?php echo $act?>' />
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td><input type='checkbox' id='chk<?php echo $i?>' name='chk_bo_table[]' value="<?php echo $list[$i][bo_table]?>" /></td>
<td style="text-align:left;">
<label for='chk<?php echo $i?>'>
<?php
if ($save_gr_subject==$list[$i][gr_subject])
echo "<span style='color:#cccccc;'>";
else
echo "<span>";
echo $list[$i][gr_subject] . " > ";
echo "</span>";
$save_gr_subject = $list[$i][gr_subject];
?>
<?php echo $list[$i][bo_subject]?> (<?php echo $list[$i][bo_table]?>)
</label>
</td>
</tr>
<? } ?>
이렇게 됩니다..
여기에 입력된 값을 update로 전송을 합니다..
이 값들을 바로 지정해서 update로 전송한다면 복사나 이동이 가능합니다~
을 보시면 submit 될때 넘기는 값이..
<input type='hidden' name='sw' value='<?php echo $sw?>' />
<input type='hidden' name='bo_table' value='<?php echo $bo_table?>' />
<input type='hidden' name='wr_id_list' value='<?php echo $wr_id_list?>' />
<input type='hidden' name='sfl' value='<?php echo $sfl?>' />
<input type='hidden' name='stx' value='<?php echo $stx?>' />
<input type='hidden' name='spt' value='<?php echo $spt?>' />
<input type='hidden' name='page' value='<?php echo $page?>' />
<input type='hidden' name='act' value='<?php echo $act?>' />
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td><input type='checkbox' id='chk<?php echo $i?>' name='chk_bo_table[]' value="<?php echo $list[$i][bo_table]?>" /></td>
<td style="text-align:left;">
<label for='chk<?php echo $i?>'>
<?php
if ($save_gr_subject==$list[$i][gr_subject])
echo "<span style='color:#cccccc;'>";
else
echo "<span>";
echo $list[$i][gr_subject] . " > ";
echo "</span>";
$save_gr_subject = $list[$i][gr_subject];
?>
<?php echo $list[$i][bo_subject]?> (<?php echo $list[$i][bo_table]?>)
</label>
</td>
</tr>
<? } ?>
이렇게 됩니다..
여기에 입력된 값을 update로 전송을 합니다..
이 값들을 바로 지정해서 update로 전송한다면 복사나 이동이 가능합니다~
게시글 옮기기라는것도 있지만 원하는 형태로 옮기실려면 프로그램을 짜야하고
그누보드 특성상 g5_write_x 이런식으로 테이블이 구성되어있어서
insert 하실때 기존 게시판의 wr_id+1로 해서 옮기면 되지 않을까 합니다.
기존 테이블 index id +1를 계산해서 insert 하는걸로 하면 가능할것 같습니다.
답변을 작성하려면 로그인이 필요합니다.