php添加代码,本机通过上传至服务器就不能添加数据
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->
$SetID=$_REQUEST[ID];
//分离价格类型
$temp_day = "";
$temp_ary = $_POST[SetCountID];
for($a=0;$a<count($temp_ary);$a++){
$temp_day = empty($temp_day) ? $temp_ary[$a] : $temp_day.",".$temp_ary[$a];
}
if (count($temp_ary)>1){
$temp_day="0,".$temp_day;
}else{
$temp_day=$temp_day;
}
///分离出发日期
$temp_str = "";
$shyt = $_POST[SetCountID2];
for($i=0;$i<count($shyt);$i++){
$temp_str = empty($temp_str) ? $shyt[$i] : $temp_str.",".$shyt[$i];
}
$ClassCot=explode(",",$temp_str);
//插入数据
for($i=0;$i<count($ClassCot);$i++){
$SetDayTime=gmdate("Y-m-d",strtotime("+$_REQUEST[SetDay] day",strtotime($ClassCot[$i])));
//echo $SetDayTime;
$Insert_Days="insert into setdays(TeamDate,ReturnDate,PlaneNums,TakeNums,P_ID,,YnDisable,Adddate)values('$ClassCot[$i]','$SetDayTime','$_POST[PeopleNums]','0','$SetID','0',now())";
echo $Insert_Days;
mysql_query($Insert_Days);
}
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号