<?php $pay = mysql_query("select * from payment where passengers_id='$passengers_id' and status = 'Paid' "); if(!$pay){echo mysql_error(); }else{ while($p = mysql_fetch_array($pay)){ $booking_id=$p['booking_id']; $book = mysql_query("SELECT * FROM booking where booking_id = '$booking_id'"); if(!$book){echo mysql_error(); }else{ while($b = mysql_fetch_array($book)){ $booking_id = $b['booking_id']; $flight_id = $b['flight_id']; $flight_type = $b['flight_type']; $flight_price = $b['flight_price']; $booking_date = $b['booking_date']; $cabin = $b['cabin']; if($flight_type == "Domestic"){ $flight = mysql_query("SELECT * FROM domes_flight where flight_id = '$flight_id'"); if(!$flight){echo mysql_error(); }else{ while($f = mysql_fetch_array($flight)){ $flight_name=$f['flight_name']; $flight_from = $f['flight_from']; $flight_to=$f['flight_to']; $flight_time=$f['flight_time']; } } } if($flight_type == "International"){ $flight = mysql_query("SELECT * FROM inter_flight where flight_id = '$flight_id'"); if(!$flight){echo mysql_error(); }else{ while($f = mysql_fetch_array($flight)){ $flight_name=$f['flight_name']; } } } echo ' <tr style="margin-top:10px;border:1px solid; border-color:#1D77E9;"> <td style="padding:10px;"> '.$flight_name.' </td> <td style="padding:10px;"> '.$flight_price.' </td> <td style="padding:10px;"> '.$flight_type.' </td> <td style="padding:10px;"> '.$cabin.' </td> <td style="padding:10px;"> '.$flight_from.' </td> <td style="padding:10px;"> '.$flight_to.' </td> <td style="padding:10px;"> '.$flight_time.' </td> <td style="padding:10px;"> <img src="images/cancel.png"></a> </td> </tr> <tr><td></td></tr> '; } } } } ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)