<?php
 include 'connection.php';
date_default_timezone_set('Asia/Calcutta');
$today = date("Y-m-d");
$time = date("h:i A"); 
$currentyear = date("Y");
  $first_name=$_POST['name'];
function randomPassword() {
    $alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    $pass = array(); //remember to declare $pass as an array
    $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache
    for ($i = 0; $i < 5; $i++) {
        $n = rand(0, $alphaLength);
        $pass[] = $alphabet[$n];
    }
    return implode($pass); //turn the array into a string
}
$unique_id = randomPassword();
$user_id=$user_account['user_id'];
$quotation_id=$_REQUEST['quotation_id'];
$customer_id=$_REQUEST['customer_id'];
?> 
<? 
$product_name=$_POST['product_name'];
$product_details=$_POST['product_details'];
$unit=$_POST['unit'];
$price=$_POST['price'];
$vendor_source = $_POST['vendor_source']; 


$qrycall = "update vendor_product_master set product_name='$product_name',product_details='$product_details',unit='$unit',price='$price' where vproduct_id = '".$_REQUEST['product_id']."'";
$rcall=mysqli_query($conn,$qrycall);

//$c_id = $_REQUEST['customer_id'];



//exit();


?>

<script>
javascript:window.location.href="edit_vendor.php?vendor_id=<?php echo $_REQUEST['vendor_id']?>";
</script>