Mini Kabibi Habibi

Current Path : C:/xampp/htdocs/esuporta/fts/SDO/
Upload File :
Current File : C:/xampp/htdocs/esuporta/fts/SDO/transfer_doc.php

<?php
include_once 'database.php';
ob_start();
session_start();
$conn =mysqli_connect("localhost","root","","dts");
if (mysqli_connect_errno()) 
{
    echo "Failed to connect:".mysqli_connect_error();
    // code...
}
?>
<?php
if(isset($_POST['UPDATE'])){
    
    $username = $_POST['username'];
    $full_name = $_POST['full_name'];
    $office = $_POST['office'];
    $full_name = $_POST['full_name'];
   
     $date_accomplished = $_POST['date_accomplished'];
    $tracking_no = $_POST['tracking_no'];
     $title = $_POST['title'];
     $recieving_date = $_POST['recieving_date'];
     $date_acknowledge = $_POST['date_acknowledge'];
     $next_location = $_POST['next_location'];
     $current_location = $_POST['current_location'];
     $feedback = $_POST['feedback'];
    
    $sql = "UPDATE documents_recieved  set next_location = '$_POST[next_location]',remarks = '$_POST[feedback]' where tracking_no = '$_POST[tracking_no]'";
     $query= mysqli_query($conn, $sql) or die(mysqli_error($conn));
     if ($query==1) 
        { 
            $ins="INSERT INTO document_tracking (tracking_no,title, recieving_personnel, recieving_date,date_acknowledge, date_accomplished,feedback) VALUES ('$tracking_no', '$title','$full_name','$recieving_date','$date_acknowledge', '$date_accomplished','$feedback')";
     $quey = mysqli_query($conn, $ins) or die(mysqli_error($conn));
      if ($quey==1)
        // code...
       {
        echo "<script type='text/javascript'>alert('Successful - Record Saved!'); window.location.href = 'document_recieved.php';</script>";
     } else {
        echo "Error: " . $ins . "
" . mysqli_error($conn);
     }
     mysqli_close($conn);
}
}

?>