<?php
include 'db/db_connect.php';
$bus_number_plate = $_REQUEST['bus_number_plate'];
$stationid = $_REQUEST['stationid'];
$companyfk = $_REQUEST['companyfk'];
$seat_number = $_REQUEST['seat_number'];
$routefkid = $_REQUEST['routefkid'];
$origin = $_REQUEST['origin'];
$destination = $_REQUEST['destination'];
$fair = $_REQUEST['fair'];
$journey_date = $_REQUEST['journey_date'];
$response = array();
$query = mysqli_query($con, "INSERT INTO journey_tb (bus_number_plate,companyfk,stationid,seat_number,routefkid,origin,destination,fair,journey_date) VALUES ('$bus_number_plate','$companyfk','$stationid','$seat_number','$routefkid','$origin','$destination','$fair','$journey_date')");

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

echo json_encode($response);
?>


