<?php
 include("../conn.php");
 $location='';
 if (isset($_POST['submit'])) {
     $id=$_POST['id'];
     $sta=$_POST['status'];
     $by=$_POST['by'];
     $date=$_POST['date'];
     $location=$_POST['location'];
 if (empty($location)) {
  $location='../general_settings';
 }
     
     $sql = "UPDATE tax SET status='$sta',`date`='$date',`by`='$by' WHERE id='$id' ";
     $query_run = mysqli_query($conn, $sql);
         
         
     if($query_run){
     echo"<script>alert('Status Updated'); window.location='$location'</script>";
     }
     }
 
       ?>