<?php
session_start(); 
ob_start();
include("../../pidbco/pidbjoin.php");
if(!isset($_SESSION['jay_proj_mngmnt']) && empty($_SESSION['jay_proj_mngmnt']))
{
    echo '<script type="text/javascript">alert("You Want To Login Now.."); window.location.href="../Login";</script>';
}

if(isset($_POST['btn_add_tax'])){	
	$taxname = strip_tags($_POST['taxname']);
	$tax = strip_tags($_POST['tax']);
	$tinsert= mysqli_query($con,"INSERT INTO `tax_master` (`tax_name` ,`tax_per`)
 VALUES ('$taxname', '$tax')");	
//header("Location: tax-master.php");
}
if(isset($_POST['btn_delete_tax'])){	
	$tid = strip_tags($_POST['tid']);
	$tdelete= mysqli_query($con,"DELETE from `tax_master` where `tid`=$tid");	
//header("Location: tax-master.php");
}
if(isset($_POST['btn_edit_tax'])){	
	$taxname = strip_tags($_POST['taxname']);
	$tax = strip_tags($_POST['tax']);
	$tid = strip_tags($_POST['tid']);
	$tinsert= mysqli_query($con,"UPDATE  `tax_master` SET `tax_name` = '$taxname',`tax_per` =  '$tax' where `tid`='tid'");	
header("Location: tax-master.php");
}
?>