<?php
include"dbconfig.php";
$link=opencon();

$name = $_POST['name'];
$contact = $_POST['contact'];
$location = $_POST['location'];
$status = $_POST['status'];
$email = $_POST['email'];
$l_status = $_POST['lead_status'];
$l_source = $_POST['lead_source'];
$l_micro = $_POST['lead_micro_source'];
$manager = $_POST['team_manager'];
$leader = $_POST['team_leader'];
$telecaller = $_POST['telecaller'];
$date = $_POST['fdate'];
$note = $_POST['note'];
$type = $_POST['type'];

$sql = "INSERT INTO new_lead (Name,Contact_No,Location,Lead_Type,Email,Lead_Status,Lead_Source,Lead_Micro_Source,Team_Manager,Team_Leader,Telecaller,Date,Note,type) VALUES ('$name','$contact','$location','$status','$email','$l_status','$l_source','$l_micro','$manager','$leader','$telecaller','$date','$note','$type')";
// echo $sql;

if(mysqli_query($link,$sql)){
    echo ("Files Inserted Successfully");
    header('location:lead_list.php');
}
else{
    echo ("Failed to Insert Files");
}


?>