我不怎么问这个问题,但如果他们是重复发送给我。他们是我制作的几个.php文件。如何将数据从一个网页发送到另一个网页?
content.php,show.php和showFilteredResult.php。
content.php发送的开始日期和结束日期的show.php它返回它是迄今为止
$(document).ready(function() {
var srt = $("#cal1Date1").val();
var end = $("#cal1Date2").val();
$.ajax({
url: "http://localhost/show.php",
data: {
srt: srt,
end: end
},
type: "POST",
dataType: "json",
complete: function (response) {
$rtndata = response.responseText;
var dat1a = jQuery.parseJSON($rtndata);
var result = dat1a.OrderID;
console.log(result[0]); // send this result
}
});
});
的orderIds现在我想用orderids到showFilteredResult发送此$结果。 PHP然后我可以使表等
你为什么想这样做?你不能在show.php中做到这一点吗?我认为这是愚蠢的从前端发送请求到后端来获取数据,然后这些数据发回,并说后端'嘿,也是这样!' (如果你没有改变他们当然) – szapio 2015-02-06 08:04:48
[将表单数据从一个网页传递给另一个PHP](http://stackoverflow.com/questions/6913970/passing-form-data-from-one- web-page-to-another-with-php) – 2015-02-06 08:17:08