누가 검색했는지 알수 있는 방법 없나요?
누군가가 '바보'라는 단어를 검색했습니다.
관리자 페이지에 '바보'라는 단어를 검색한 사람 아이디나 이름이 나오는 기능과
누가 클릭했는지 알수 있는 방법 있나요?
소스 구현 어려울까요?
포인트 많이 드릴게요
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 8개
$sql = " insert into $g4[popular_table] set pp_word = '$search_str', pp_date = '$g4[time_ymd]', pp_ip = '$_SERVER[REMOTE_ADDR]' ";
이걸 다음과 같이
$sql = " insert into $g4[popular_table] set pp_word = '$search_str', pp_date = '$g4[time_ymd]', pp_ip = '$_SERVER[REMOTE_ADDR]', mb_id = '$member[mb_id] ";
검색을 누가 뭘 했는지 보고 싶다면 다음과 같이 결과 확인
$query = "select * from `$g4[popular_table] where mb_id order by pp_id DESC"
while($row = sql_fetch_array($query)) {
echo "$row[pp_word] - $row[mb_id]";
}
include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/head.php");
$query = "select * from `$g4[popular_table] where mb_id order by pp_id DESC"
while($row = sql_fetch_array($query)) {
echo "$row[pp_word] - $row[mb_id]";
}
include_once("$g4[path]/tail.php");
include_once("$g4[path]/tail.sub.php");
?>
이렇게 작성했는데 500 내부서버오류가 나네요..
http://zv.pe.kr/search_who.php
또 세미콜론이 빠졌군요 후훗
고쳤습니당~