[질답/버그/제안] apms.js 파일에 apms_scrap 로 별도로 만들고 싶은되요
작성자 정보
- 관리자 작성
- 작성일
컨텐츠 정보
- 385 조회
-
목록
본문
아래 부분이 실행 이 안되고
null 만 나오는되요
이부분에 추가 할려면 별도로 진행 해야 되나요?
조언 구합니다.
bbsscrap.php
// 자바스크립트 사용가능할 때
if($_POST['js'] == "on") {
$error = $success = $count = "";
function print_result($error, $success, $count) {
echo '{ "error": "' . $error . '", "success": "' . $success . '", "count": "' . $count . '" }';
exit;
}
if (!$is_member) {
$error = 'login';
print_result($error, $success, $count);
}
if (!($bo_table && $wr_id)) {
$error = '값이 제대로 넘어오지 않았습니다.';
print_result($error, $success, $count);
}
$sql = " SELECT count(ms_id) AS cnt FROM g5_scrap WHERE mb_id='{mb_id}' AND bo_table = '{$bo_table}' AND wr_id = '{$wr_id}' ";
$row = sql_fetch($sql);
$error = $sql;
}
apms.js
function apms_bbs_scrap(mb_id, bo_table, wr_id, id) {
var href = g5_bbs_url + '/bbsscrap.php?id=' + mb_id + '&bo_table=' + bo_table + '&wr_id=' + wr_id;
$.post(href, { js: "on" }, function (data) {
console.log(data);
}, "json");
}
관련자료
-
링크
댓글 0
등록된 댓글이 없습니다.