I post data to a php processing page like this:
$insert = mysql_query(
'INSERT INTO ' . $table . ' (' . substr($addfields,0,-1) . ') ' .
'VALUES (' . substr($addvals,0,-1) . ')');
我希望能够:
if($insert): echo 'Message 1'; else: echo 'message2'; endif;
在我的 success: function() 中,我应该怎么做才能将消息显示在 <div id="result"></div>
中?
我尝试过以下方法:
success: function() {
$(#result).html(html);
}
这段代码没有在div标签中显示信息。
我如何将数据发布到div中?