<?php
include 'db/db_connect.php';
$journeyid = $_REQUEST['journeyid'];
$companyfk = $_REQUEST['companyfk'];
$custnumber = $_REQUEST['custnumber'];
$custnextofkin = $_REQUEST['custnextofkin'];
$luggagefair = $_REQUEST['luggagefair'];
$journey_date = $_REQUEST['journey_date'];
$routefk = $_REQUEST['routefk'];
$fair = $_REQUEST['fair'];
$cashiername = $_REQUEST['cashiername'];
$response = array();
$query = mysqli_query($con, "INSERT INTO ticket_transactions_tb (companyfk,journeyid,custnumber,custnextofkin,luggagefair,journey_date,routefk,fair,cashiername) VALUES ('$companyfk','$journeyid','$custnumber','$custnextofkin','$luggagefair','$journey_date','$routefk','$fair','$cashiername')");
if($query){
  $response['success'] = 'true';
  $response['message'] = 'Data Inserted Successfully';
}else{
  $response['success'] = 'false';
  $response['message'] = 'Data Insertion Failed';
}

echo json_encode($response);
?>
