代码点火器和php表单ajax表单提交


code igniter and php form ajax form submission

我正在尝试使用带有CI的jquery表单提交,但无法从php文件中获取返回值。

     $(document).ready(function($){
      $("#submit_btn").click(function(){
    var response = $.ajax({
        type: "POST",
        url: "send_email.php",
        data: $(commentForm).serialize()
    }).responseText;
.......
    here i want to get value return from PHP so that i can print that value
     like bellow
    .......
  $('#commentForm').html('<h5>Thanks</h5>'+here is result from php);
    return false;
});  

});

ajax完成后显示消息
$.ajax({
    type: "POST",
    url: "send_email.php",
    data: $(commentForm).serialize()
}).done(function( msg ) {
   $('#commentForm').html('<h5>Thanks</h5>'+msg);
   return false;
});