if (isset($_POST['update_flight_details'])) {
     $flight_id = $_GET['flight_id'];
     $flight_owner = $_POST['flight_owner'];
     $source = $_POST['source'];
     $destination = $_POST['destination'];
     $no_of_stoppage = $_POST['no_of_stoppage'];
     $stoppage_1 = $_POST['stoppage_1'];
     $stoppage_2 = $_POST['stoppage_2'];
     $flight_depart = $_POST['flight_depart'];
     $flight_arrive = $_POST['flight_arrive'];
     $economy_price = $_POST['economy_price'];
     $business_price = $_POST['business_price'];
     $time_stop_1 = $_POST['time_stop_1'];
     $time_stop_2 = $_POST['time_stop_2'];
     $availability = $_POST['no_of_seats'];
     $update_flight = $user_object->update_flight_details($con, $flight_id, $flight_owner, $source, $destination, $no_of_stoppage, $stoppage_1, $stoppage_2, $flight_depart, $flight_arrive, $economy_price, $business_price, $time_stop_1, $time_stop_2, $availability);
     if ($update_flight) {
         echo "<h2>Flight details updated successfully.</h2>";
     } else {
         echo "Could not update flight details.";
     }
 } else {
     if (isset($_POST['view_flight_admin'])) {
         $flight_id = $_POST['flight_id'];
         //echo $flight_id;
         $details = $user_object->flight_details_view($con, $flight_id);
         if (mysqli_num_rows($details) == 0) {
             echo '<h2>Please enter a valid Flight Id.</h2>';
         } else {
             echo '<h2>Flight Details for ' . $flight_id . '</h2>';
             $link = "flight.php?flight_id=" . $flight_id;