<?php

require_once('../config/config.php');
require_once('../foo/functions.php');
dbconnect();
session_start();

if ($_SERVER['REQUEST_METHOD'] === 'GET') {

	if (delete_trans($_GET['id'])) {
		$user = $_GET['user'];
		$name = $_GET['name'];
		$acc = $_GET['acc'];
		log_info($_SERVER['REMOTE_ADDR'], $_SESSION['admin_login'], $_GET['user'], 'Transaction Successfully Deleted');
		redirect('add.php?user='.$user.'&name='.$name.'&acc='.$acc.'&msg=' . urlencode('Transaction Succesfully Added'));	
	}
}

?>