<?php
//DB Data
include '../../ASEngine/AS.php';
if(!$login->isLoggedIn())
    header("Location: ../../login.php");
$user = new ASUser(ASSession::get("user_id"));
$userInfo = $user->getInfo();

//basic include files
require_once("../../../db.php");

//Variables Post
$tran_id = $_POST['tran_id'];
$transaction_id = $_POST['transaction_id'];
$cardholder_first_name = $_POST['cardholder_first_name'];
$cardholder_last_name = $_POST['cardholder_last_name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$precio_total = $_POST['precio_total'];
$payment_complete = $_POST['payment_complete'];
$message = $_POST['message'];

mysqli_query($conn, "UPDATE transactions SET operator_transaction_id = '$transaction_id', cardholder_first_name = '$cardholder_first_name', cardholder_last_name = '$cardholder_last_name', phone = '$phone', email = '$email', precio_total = '$precio_total', auth_code = '$payment_complete', message = '$message' WHERE transaction_id = $tran_id");

mysqli_close($conn);

header("Location: ../../manage-transaction.php?tranid=".$tran_id."&salemsn=updated");
?>