录入表单信息后,点击保存,有时候自动保存成2词一样的记录。有遇到过的没,重复添加一次,有时候有,有时候没有
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><?php require("zbconnqt.php")?>
<?php
mysql_query('SET NAMES UTF8');
?>
<?php
$jintian=date("Y-m-d");
$jintian2=strtotime($jintian);
$exec="select * from paihuo_yd where xid=$_GET[ydid]";
$rrr=mysql_fetch_array(mysql_query($exec));
$riqi=$rrr['time2'];
$ydid=$_GET['ydid'];
$pzid=$_GET['pzid'];
$dwid=$_GET['dwid'];
$fhsl=$_GET['fhsl'];//取货数量
//$xqsl=$_GET['xqsl'];//该运单的总发货数量
if(empty($_GET['ydid']) || empty($_GET['pzid']) || empty($_GET['dwid']) || empty($_GET['fhsl'])){
header('location:paihuo2.php?pzid=$pzid&ydid=$ydid');
}else{
$aa="insert into paihuo_pd (ydid,pzid,dwid,fhsl,time,time2) values ('$ydid','$pzid','$dwid','$fhsl','$jintian','$jintian2')";
//mysql_query($exec, $conn);
$result = mysql_query($aa,$Conn)or die(mysql_error());
mysql_free_result($result);
mysql_close($result);
$exec="update paihuo_dl set xid='$dwid',zsl=zsl-'$fhsl' where xid=$dwid";//更新库存数据
mysql_query($exec);
mysql_close($Conn);
?>
<?php
}
?>
<script language="javascript">alert('取货成功!');location.href='paihuo2.php?pzid=<?php echo $pzid;?>&ydid=<?php echo $ydid;?>&riqi=<?php echo $riqi;?>'</script>