Hi all, I am trying to show my table information individually, but I just cannot find the way of doing it. At the moment it looks like this-
[ATTACH]4875[/ATTACH]
I want it to show like this -
[ATTACH]4877[/ATTACH]
Here are my code <?php
$depAirport=clean($POST['depAirport']);
$arrAirport=clean($POST['arrAirport']);
$dDate=clean($POST['dDate']);
$rDate=clean($POST['rDate']);
$adult=clean($POST['adult']);
$child=clean($POST['child']);
$infants=clean($POST['infants']);
$myList=clean($POST['myList']);
function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
$sql= "SELECT * from flight
WHERE
departure_airport ='$depAirport' AND arrival_airport = '$arrAirport' AND departure_date ='$dDate'";
$result = mysql_query($sql);
echo "<table id='kool' border='1' cellpadding='2' summary='Table holds flight information'>
<tr>
<th>Flight No</th>
<th>Departure Airport</th>
<th>Arrival Airport</th>
<th>Departure Date</th>
<th>Arrival Date</th>
<th>Flight Price</th>
<th>Flight Duration</th>
<th>Airline</th>
</tr>";
while ($row = mysql_fetch_array($result)) {echo "<tr>";
echo "<td>" . $row['flight_no'] . "</td>";
echo "<td>" . $row['departure_airport'] . "</td>";
echo "<td>" . $row['arrival_airport'] . "</td>";
echo "<td>" . $row['departure_date'] . "</td>";
echo "<td>" . $row['arrival_date'] . "</td>";
echo "<td>" . '£' . $row['flight_price'] . "</td>";
echo "<td>" . $row['flight_duration'] . "</td>";
echo "<td>" . $row['flight_name'] . "</td>";
echo "</tr>"; }
?>
<tr>
<td colspan="18">Total fare per Adult is
<?php echo '£' . 'flight_price';
?>
<input type="submit" name="Select Flight" id="submit" style="float:right" />
</td>
</tr>
</tfoot>
</table>
Please help and thanks in advance
pic1.png
pic2.png