<?php
session_start();
$companyname=$_SESSION['companyname'];//;
$adminemailid=$_SESSION['emailid'];//;
if(isset($_POST['idno'])){
    $id= $_POST['idno'];
    $percentage= $_POST['percentage'];
    $name= $_POST['name'];
     include '../Model/configuration.php';
     $sql="UPDATE `sales_pipeline_type` SET `pipe_name`='$name',`pipe_percentage`='$percentage' WHERE `id`='$id' ";
     $em=$pdo->prepare($sql);
        $em->execute();
        
}
?>
<?php
if(isset($_POST['percentage_insert'])){
    $percentage=$_POST['percentage_insert'];
    $name=$_POST['name_insert'];
    $sql="INSERT INTO `sales_pipeline_type`( `companyname`, `adminemailid`, `pipe_name`, `pipe_percentage`, `pipe_created_by`, `pipe_created_type`) VALUES ('$companyname','$adminemailid','$name','$percentage','$adminemailid','admin')";
    include '../Model/configuration.php';
     $em=$pdo->prepare($sql);
        $em->execute();
}
?>