数据字符串是:
{"feedback_type":"000","error_type":"","textarea":"blahblahblahblahblahblahblahblahblahblahblahblahblahblahblahblah"}
我使用以下代码发布到 PHP:
// ajax post
$.ajax({
type: "POST",
url: "core/poster.php" ,
data: dataString,
success:function()
{
alert("Success!");
}
});
return false;
和 php 文件:
<?php
require 'Class_DBOperation.php';
require 'global.php';
// Establish Database Connection
$dbOperation = new class_DBOperation(DBHOST,DBUSER,DBPWD,DBNAME,DBCHARSET);
// Receive dataString
$content=$_POST['feedback_type'];
$run=mysql_query("insert into reports values (NULL, '".$content."')");
?>
问题是为什么 $content 是空的?我应该怎么办 ?有任何想法吗?