<?php 
include "config.php";
session_start();
$user=$_SESSION['log'];
$vehicle = $_POST['vehicleno'];
$length = $_POST['length'];
$width = $_POST['width'];
$height = $_POST['height'];
$cft=$_POST['cft'];
$unit = $_POST['unit'];
$chakka = $_POST['chakka'];
echo $vehicle;
foreach($vehicle as $id => $value){
$sql = "INSERT INTO cftdetails(vehicleno, chakka, length, width, height, cft, unit,time,date,status, editby, editdate, edittime,syncdata) VALUES ('$vehicle[$id]','$chakka[$id]','$length[$id]','$width[$id]','$height[$id]','$cft[$id]','$unit[$id]',CURRENT_TIME(),CURRENT_DATE(),'','$user','','','0')";
echo $sql;
$go = mysqli_query($connect,$sql);
}
header("Location:master_cft.php");
?>