추천 후 새로고침 하려면 이렇게 하면 될까요?

· 17년 전 · 789 · 1
추천을 하고 페이지가 새로고침되게 하려합니다.

아래처럼 했는데 잘 안되네요...

어디를 수정해야 할까요?

// 추천(찬성), 비추천(반대) 카운트 증가
sql_query(" update {$g4[write_prefix]}{$bo_table} set wr_{$good} = wr_{$good} + 1 where wr_id = '$wr_id' ");
// 내역 생성
sql_query(" insert $g4[board_good_table] set bo_table = '$bo_table', wr_id = '$wr_id', mb_id = '$member[mb_id]', bg_flag = '$good', bg_datetime = '$g4[time_ymdhis]' ");

if ($good == "good")
$status = "추천";
else
$status = "비추천";

echo "<script language='JavaScript'> alert('본 게시물을 \'$status\' 하셨습니다.');</script>";
echo "<script language='JavaScript'>location.reload(); </script>";

}
}

@include_once("$board_skin_path/good.tail.skin.php");
?>
<script language="JavaScript"> window.close(); </script>
|

댓글 1개

echo "<script language='JavaScript'> alert('본 게시물을 \'$status\' 하셨습니다.');</script>";
echo "<script language='JavaScript'>location.reload(); </script>";
부분을 아래와 같이 하시면 됩니다..


echo "<script language='JavaScript'> alert('이 글을 \'$status\' 하셨습니다.');</script>";
$re = "./board.php?bo_table=$bo_table&wr_id=$wr_id&page=$page";
echo "<script language='JavaScript'>top.location.href = '$re;</script>";
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
17년 전 조회 708
17년 전 조회 677
17년 전 조회 686
17년 전 조회 768
17년 전 조회 752
17년 전 조회 771
17년 전 조회 875
17년 전 조회 710
17년 전 조회 780
17년 전 조회 790
17년 전 조회 794
17년 전 조회 765
17년 전 조회 758
17년 전 조회 769
17년 전 조회 1,528
17년 전 조회 968
17년 전 조회 861
17년 전 조회 756
17년 전 조회 856
17년 전 조회 644