我正在以适当的方式做,但没有回应$ ctemp的价值为什么会发生这种情况 [英] I am doing in proper way but not echoing value of $ctemp why this happen
问题描述
这是函数ajax调用
函数updateProduct(typeopts){
$ .ajax({
类型:POST,
url:include / submit.php,
dataType:'json',
数据:{filterTypeOpts:typeopts,child:179},
cache:false,
成功:函数(数据){
$('#disp')。html(makeTable(data));
}
});
}
在submit.php页面上
echo $ typeopts = isset($ _ POST ['filterTypeOpts'])? $ _POST ['filterTypeOpts']:array('');
echo $ ctemp = $ _POST ['child'];
this is function ajax call
function updateProduct(typeopts){
$.ajax({
type: "POST",
url: "include/submit.php",
dataType : 'json',
data: {filterTypeOpts: typeopts,child: 179},
cache: false,
success: function(data){
$('#disp').html(makeTable(data));
}
});
}
on submit.php page
echo $typeopts = isset($_POST['filterTypeOpts'])? $_POST['filterTypeOpts'] : array('');
echo $ctemp = $_POST['child'];
推荐答案
.ajax({
类型:POST,
url:include / submit.php,
dataType:'json',
data:{filterTypeOpts:typeopts,child:179},
cache:false,
成功:function(data){
.ajax({
type: "POST",
url: "include/submit.php",
dataType : 'json',
data: {filterTypeOpts: typeopts,child: 179},
cache: false,
success: function(data){
('#disp')。html(makeTable(data));
}
});
}
在submit.php页面上
echo
('#disp').html(makeTable(data));
}
});
}
on submit.php page
echo
typeopts = isset(
typeopts = isset(
这篇关于我正在以适当的方式做,但没有回应$ ctemp的价值为什么会发生这种情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!