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
| <?php
$date_voy=$_POST['dt'];
$num_depart=$_POST['numdep'];
$nom_cond=$_POST['nomcond'];
$lib_dest=$_POST['dest'];
try
{
$connect = new PDO('mysql:host=localhost;dbname=Gestion voyage', 'root' , '');
}
catch(Exception $e)
{
die('erreur:' .$e->getMessage());
}
$complique = $connect->prepare('SELECT client.code_clt,client.nom_clt,client.prenom_clt,client.num_carte_clt FROM voyage,conducteur,destination,client WHERE(conducteur.mat_cond=voyage.mat_cond AND voyage.num_dest=destination.num_dest AND destination.num_dest=voyage.num_dest AND voyage.code_clt=client.code_clt AND date_voy = :date_voy AND num_depart = :num_depart AND nom_cond = :nom_cond AND lib_dest = :lib_dest ORDER BY client.nom_clt ASC)') or die(print_r($connect->errorInfo()));
$complique->execute(array(
'date_voy' => $_GET['date_voy'],
'num_depart' => $_GET['num_depart'],
'nom_cond' => $_GET['nom_cond'],
'lib_dest' => $_GET['lib_dest']
));
while ($liste=$complique->fetch())
{
echo('<tr>');
echo('<td>'.$liste['code_client'].'</td>');
echo'<td></td>';
echo('<td>'.$liste['nom_client'].'</td>');
echo'<td></td>';
echo('<td>'.$liste['prenom_client'].'</td>');
echo'<td></td>';
echo('<td>'.$liste['num_carte_client'].'</td>');
echo('</tr>');
}
$complique->closeCursor();
?> |