<?php
session_start();
require_once '../../Server/connection.php';
if($_POST){	

  $exp_id  = $_POST['exp_id'];
  $expCate_id  = $_POST['expCate_id'];
  
  $currency_id = $_POST['currency_id'];
  
  $amount  = $_POST['amount'];
 
  $exp_desc = addslashes($_POST['exp_desc']);
  
  $sql = "UPDATE expenses SET expCate_id = '$expCate_id',amount = '$amount',exp_desc='$exp_desc',currency_id='$currency_id' WHERE exp_id = {$exp_id}";		

  $result = $conn->query($sql);
  
  if($result){
	  
   $_SESSION['success_message'] = "You have successfully Updated Expenses";
  header("Location: ../editExpenses.php");
  exit();
	  
  }
  
 

} 