0
私は、変数としてmemberIDをポストする必要がある次のJquery関数を持っています。そして、私は$memberID = $_REQUEST['memberID']
というadd_comment.phpファイルでそれを捕捉したいのですが、nullを返します。Jquery .post()メソッドの問題
$('a.comment').die("click").live("click", function(e){
var getpID = $(this).parent().attr('id').replace('commentBox-','');
var comment_text = $("#commentMark-"+getpID).val();
if(comment_text != "Write a comment...")
{
$.post("lib/actions/add_comment.php?comment_text="
+comment_text+"&post_id="+getpID,{ memberID : 5
}, function(response){
$('#CommentPosted'+getpID).append($(response).fadeIn('slow'));
$("#commentMark-"+getpID).val("Write a comment...");
});
}
});
「comment_text」をエスケープしてみることはできますか? – peakit