<?php 
include "config.php";
session_start();
$user=$_SESSION['log'];
$date = $_POST['date'];
$customer = $_POST['customername'];
$productcode = $_POST['product'];
$productname = $_POST['productname'];
$price = $_POST['price'];
$price_est = $_POST['priceest'];
foreach ($productcode as $id => $value ){
$sql = "insert into customerrate (date,customer,productcode,productname,price,price_est,editby,edittime,editdate,status) values('$date','$customer','$productcode[$id]','$productname[$id]','$price[$id]','$price_est[$id]','$user',CURRENT_TIME(),'CURRENT_DATE()','')";
echo $sql;
 $go = mysqli_query($connect,$sql);
}
 header('Location:ratemaster.php');

?>