1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| <?php
if((isset($_POST['ville_Arrivee'])) AND (isset($_POST['ville_Depart'])) AND (isset($_POST['date_choisiee'])))
{
$villearrivee = $_POST['ville_Arrivee'];
$villedepart = $_POST['ville_Depart'];
$datechoisiee = $_POST['date_choisiee'];
$conn = oci_connect('scott', 'tiger', 'orcl');
$sql = oci_parse($conn, 'select calendrier.date_choisiee,
calendrier.hid,
heure.id_h,
heure.f_des,
destinations.id_des,
aeroport.ae_id,
destinations.ville_depart,
destinations.ville_arrivee,
heure.heure_depart,
heure.heure_arrivee,
heure.prix from calendrier,destinations,heure,aeroport
where destinations.ville_arrivee=aeroport.ae_id
and ville_depart=$villedepart
and heure.f_des=destinations.id_des
and ville_arrivee=$villearrivee
and calendrier.hid=heure.id_h
and date_choisiee=\''.$datechoisiee.'\'');
oci_execute($sql);
while ($row = oci_fetch_array($sql)){
echo $row['DATE_CHOISIEE'];
echo $row['HEURE_DEPART'];
echo $row['HEURE_ARRIVEE'];
echo $row['VILLE_DEPART'];
echo $row['VILLE_ARRIVEE'];
}
}
?> |
Partager