답변 3개
간단히 설명드리자면
해당 view페이지 상단에 form추가하시고 넘겨줄 파일의 경로를 걸어주시고요
버튼 클릭시 히든으로 값을 넘겨주면됩니다.
<form name="fwrite" method="post" action="./test.php" onsubmit="return fwrite_submit(this);">
<input type="hidden" name="cf_intercept_ip" value="<?php echo $ip ?>">
<input type="submit" class="submit" accesskey="s" value="확인" />
<form>
대략 이런식이고
input name을 cf_intercept_ip로 해당 value에는 해당 ip가 들어가겠습니다.
확인을 누르면 test.php 파일로 가게되는데
이때에 test.php 파일에서
해당 부분 업데이트하는 쿼리문을 추가하시면 되겠습니다.
업데이트는 간단하게 하실수있으실테고
게시글삭제는
해당 파일에서 해당 ip로 게시판에서 검색해서
일괄 삭제하면됩니다.
삭제시 여러필드에서 삭제해주셔야하며
// 게시글 삭제
sql_query("delete from $bo_table where wr_id = '{$wr_id}' ");
// 최근게시물 삭제
sql_query(" delete from {$g5['board_new_table']} where bo_table = '$bo_table' and wr_parent = '{$wr_id}' ");
// 스크랩 삭제
sql_query(" delete from {$g5['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$wr_id}' ");
// 글숫자 감소
sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write - '$count_write' where bo_table = 'test' ");
이와같은 해당 쿼리문도 추가해주셔야 깔끔하게 정렬이 됩니다.
답변을 작성하려면 로그인이 필요합니다.