<?php 


include('../conn.php');


if(isset($_POST['submit'])){
    $data =$_POST['id'];
	$name =$_POST['name'];
    $percent=$_POST['percent'];
    $date=$_POST['date'];
    $by=$_POST['by'];


		$sql = "UPDATE `tax` SET `tax`='$name',`percent`='$percent',`date`='$date',`by`='$by'WHERE id='$data'";
		if(mysqli_query($conn,$sql)){
      echo"<script>alert('You Have Successfully updated  tax'); window.location='../general_settings'</script>";
		}
		else{
		  echo 'Error: '.mysqli_error($conn);
		}
	}
 
