Code: Select all
<?php
//session_start();
include ('DB_Connect.php');
if (!isset($_GET ['Return_Ticket'])) {
echo "Nothing happend";
}
if (isset($_GET ['Return_Ticket'])) {
$Flight_Source= $_GET ['Flight_Source'];
$Flight_Destination= $_GET ['Flight_Destination'];
$Departure_Date = $_GET ['Departure_Date'];
$Arrival_Date=$_GET['Arrival_Date'];
$Travel_Class = $_GET['Travel_Class'];
$sql = "SELECT * FROM flight_info where Flight_Source='$Flight_Source' and Flight_Destination='$Flight_Destination' and Departure_Date='$Departure_Date' and Arrival_Date='$Arrival_Date'";
$retval =mysql_query($sql, $conn);
if(!$retval) {
echo "No Record Found";
exit();
}
while($row = mysql_fetch_array($retval))
{
echo "
<table>
<tr>
<td> $row[2]</td>
<td> $row[3]</td>
<td> $row[4]</td>
<td> $row[6]</td>
<td> $row[8]</td>
<td><a href='Book.php'><button>Book Flight</button></a></td>
</tr>
</table>
";
}How do i select a specific row for ticket confirmation. when user click on book Flight