<?php session_start();
include "conn.php";



if ($_POST['name']) {
	
	$name = $_POST['name'];
	$role = $_POST['role'];
	$email = $_POST['email'];
	$mobile = $_POST['mobile'];
    $dob = $_POST['dob'];
	$v_code= $_SESSION['v_code'];
	$uid = $_POST['uid'];
	$pan= $_POST['pan'];
	$acc_holder= $_POST['acc_holder'];
	$acc_no= $_POST['acc_no'];
	$bank_name= $_POST['bank_name'];
	$ifsc= $_POST['ifsc'];
	$branch= $_POST['branch'];


    $query="update tbl_vendor set name='$name',role='$role',email='$email',mobile='$mobile',dob='$dob',uid='$uid',pan='$pan',acc_holder='$acc_holder',acc_no='$acc_no',bank_name='$bank_name',ifsc='$ifsc',branch='$branch',updated_at=CURRENT_TIMESTAMP() where v_code='$v_code'";

	$smt = mysqli_query($conn, $query);
	if ($smt) {
		echo "Sucess ! Your data successfully submited";
	} else {
		echo ("Failed ! Error Description: " . mysqli_error($conn));
	}
} else {
	echo ("Enter all * Marked Fields. " . mysqli_error($conn));
}

?>