<?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 tos8 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:track1.php");
        }
        else
        {
            echo ' Please Check Your Query ';
        }
    }
    else
    {
        header("location:track1.php");
    }


?>