<?php
include 'db/db_connect.php';
$journeyid = $_REQUEST['journeyid'];
$companyfk = $_REQUEST['companyfk'];
$sendernumber = $_REQUEST['sendernumber'];
$receivernumber = $_REQUEST['receivernumber'];
$journey_date = $_REQUEST['journey_date'];
$routefk = $_REQUEST['routefkid'];
$fair = $_REQUEST['fair'];
$cashiername = $_REQUEST['cashiername'];
$response = array();
$query = mysqli_query($con, "INSERT INTO parcel_tb (journeyid,companyfk,sendernumber,receivernumber,fair,journey_date,routefk,cashiername) VALUES ('$journeyid','$companyfk','$sendernumber','$receivernumber','$fair','$journey_date','$routefk','$cashiername')");

if($query){
  $response['success'] = 'true';
  $response['message'] = 'Data Inserted Successfully';
}else{
  $response['success'] = 'false';
  $response['message'] = 'Data Insertion Failed';
}

echo json_encode($response);
?>
