所有PHP的, 说我有下面的代码位:值传递给jQuery的POST
select: function(start, end, allDay) {
var title = prompt('Event Title:');
if (title) {
calendar.fullCalendar('renderEvent',
{
title: title,
start: start,
end: end,
allDay: allDay
},
true // make the event "stick"
);
alert(start);
jQuery.post("save_calendar_event.php", {
title: title,
start: start,
end: end,
allDay: allDay
}, function(data){
alert(data);
});
}
calendar.fullCalendar('unselect');
}
然后,我有一个PHP页面来接受这个职位值:
$title = $_POST['title'];
$start_time = $_POST['start'];
echo "The start time is: ".$start_time;
如果我回显$标题它的工作正常,但如果我做$ start_time它说价值不存在。当警报显示在jQuery端的开始时,它有我想要传递的数据。为什么不把它传递给我的PHP页面?
编辑:如果我做了我的警报警报显示:太阳2012年1月29日12:00:00 GMT-0600(中部标准时间)
谢谢!
使用浏览器的网络监视工具来检查发送到您的PHP脚本的POST参数。开始设置是否正确? – Phil 2012-02-01 02:48:44
在你的php中,做一个'print_r($ _ POST)'。也许你的'start'变量被索引的方式不同,那么你认为。 – 2012-02-01 02:48:57
它说“价值不存在”?没有,它究竟说了什么?另外,'var_dump($ _ POST)'给你什么? – deceze 2012-02-01 02:49:05