0){ while($resultM = mysql_fetch_array($dbquery)){ $max = $resultM['MaxID']; } $DCarId = $max+1; } else{ $DCarId = 1; } $sql= "insert into DetailCar(DetailCarID,HDate,CarNumber,OutIn,PeoReq,Position,Deptcode,DateStart,TimeStart,DateEnd,TimeEnd,Address,Tumbon,Aumphur,Provinc,AmountPeo,ListPeo,StartCar,TimeStartCar,DriverCode,UseFor)VALUES($DCarId,'$HDateNew','$CareNumber','$OutIn','$Name','$Position',$Depart,'$StartDate','$TimeStart','$EndDate','$TimeStart2','$Att',$district_id,$amphur_id,$province_id,'$amount','$ListPeople','$StartCar','$timeStartCar',$DrvCode,'$Gofor')"; // echo "Sql ==>".$sql; ?>

แบบขออนุมัติใช้รถยนต์
OK "; } else{ echo "ไม่สามารถบันทึกข้อมูลได้
<<ย้อนกลับ"; } ?>