<?php
	include('includes/config.php');
	
	$id = $_POST['id'];
	$transact_from = $_POST['transact_from'];
	$transact_to = $_POST['transact_to'];
	$guards = $_POST['guards'];
	$client = $_POST['client'];
	$equipments = $_POST['equipments'];

	//for  history log
$pc_time = $_POST['pc_time'];
$pc_date = $_POST['pc_date'];
$user = $_POST['user'];

		$mon_id = $_POST['id'];
		
		
		mysql_query("UPDATE monitoring SET transact_from ='$transact_from', 
					transact_to ='$transact_to', 
					guards ='$guards', 
					client='$client', 
					equipments='$equipments'
					WHERE trans_id ='$mon_id'") or die(mysql_error());  
		
echo "success";
mysql_query("INSERT INTO history (`data`,`actions`,`date`,`user`)VALUES('$transact_from to $transact_to', 'modified transaction', '$pc_date $pc_time', '$user')")or die(mysql_error());	
//for log	
?>