<?php 

    require_once("connection.php");

    if(isset($_POST['update']))
    {
        $UserID = $_GET['ID'];
		$UserDate = $_POST['date'];
        $UserTime = $_POST['time'];
        $UserLastlocation = $_POST['lastlocation'];
        $UserStatus = $_POST['status'];
		$UserRemarks = $_POST['remarks'];
		

        $query = " update tostos3 set User_Date = '".$UserDate."', User_Time = '".$UserTime."', User_Lastlocation='".$UserLastlocation."', User_Status='".$UserStatus."', User_Remarks='".$UserRemarks."'  where User_ID='".$UserID."'";
        $result = mysqli_query($con,$query);

        if($result)
        {
            header("location:track2.php");
        }
        else
        {
            echo ' Please Check Your Query ';
        }
    }
    else
    {
        header("location:track2.php");
    }


?><?php 

    require_once("connection.php");

    if(isset($_POST['update']))
    {
        $UserID = $_GET['ID'];
		$UserTransaction = $_POST['transaction'];
        $UserRefrence = $_POST['refrence'];
        $UserDescription = $_POST['description'];
        $UserDebit = $_POST['debit'];
		$UserCredit = $_POST['credit'];
		

        $query = " update tostos set User_Transaction = '".$UserTransaction."', User_Refrence = '".$UserRefrence."', User_Description='".$UserDescription."', User_Debit='".$UserDebit."', User_Credit='".$UserCredit."'  where User_ID='".$UserID."'";
        $result = mysqli_query($con,$query);

        if($result)
        {
            header("location:acc2.php");
        }
        else
        {
            echo ' Please Check Your Query ';
        }
    }
    else
    {
        header("location:acc2.php");
    }


?>