채택완료

코멘트 페이징 답변 작성 후 페이지 이동

2017-04-24 (월) 07:55:49 4,338

안녕하세요

https://sir.kr/g5_tip/3336

위의 팁을 적용해 게시판 하나에서만 코멘트 페이징 기능을 사용하고 있습니다.

이때 코멘트 페이지 2페이지, 3페이지 등 뒷페이지의 코멘트에

답변을 달면 항상 첫 페이지로 이동합니다.

뒷페이지의 코멘트에 답변을 달 경우나 코멘트를 수정한 경우

해당 코멘트 페이지에 머물러 있게 하고 싶은데요.

write_comment_update.tail.skin.php를 이용해


goto_url(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.'&c_page='.$c_page);

을 넣어봤지만 $c_page가 공란이 됩니다.

어떻게 하면 현재 페이지에 머물러 있을 수 있을지

고견 부탁드립니다.

감사합니다. 

답변 1개 / 댓글 1개

채택된 답변
+20 포인트
Copy
<form name="fviewcomment" action="./write_comment_update.php" onsubmit="return fviewcomment_submit(this);" method="post" autocomplete="off">    <input type="hidden" name="w" value="<?php echo $w ?>" id="w">    <input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">    <input type="hidden" name="wr_id" value="<?php echo $wr_id ?>">    <input type="hidden" name="comment_id" value="<?php echo $c_id ?>" id="comment_id">    <input type="hidden" name="sca" value="<?php echo $sca ?>">    <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="is_good" value="">    <input type="hidden" name="c_page" value="<?php echo $c_page; ?>">

view_comment.skin.php 중에  

코멘트 관련  form 문 안에 c_page  를 삽입해서 이요하시기 바랍니다. 

답변에 대한 댓글 1개

덕분에 해결했습니다. 정말 감사합니다.

답변을 작성하려면 로그인이 필요합니다.