使用 ajax 代码:
$.ajaxSetup({
url: "last-id-test.php",
type: "POST",
});
$.ajax({
data: {theinfo: 'forminfo'},
success: function(data) {alert(data)},
error: function (XMLHttpRequest, textStatus, errorThrown){alert('Error submitting request.')}
});
然后是last-id-test.php的简单php:
$showme = $_GET['theinfo'];
我总是收到错误“未定义的索引 - theinfo”...
我看不到我的错误?