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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
</head>
<body>
<?php
// information pour la connection à le DB
include('config.php');
$vehicule = $_GET['vehicule'];
echo $vehicule;
//echo '<font color="white">c\'est ok</font>';
$select = "SELECT * FROM anomalies WHERE vehicule = $vehicule";
$result = $conn->query($select);
$total = mysqli_num_rows($result);
if($total) {
// debut du tablea'
echo '<table align="center" bgcolor="#FFFFFF">'."\n";
echo '<tr>';// debut
echo '<td align="center"; style="color:white" bgcolor="#0072ff"><b><u>VEHICULE</u></b></td>';
echo '</tr>'."\n";// fin
// lecture et affichage des résultats sur 2 colonnes, 1 résultat par ligne.
while($row = mysqli_fetch_array($result)) {
echo '<tr>';//debut
echo '<td align="left"; style="color:black"; bgcolor="#CCCCCC" title="" >'.$row["vehicule"].'</td>';
}
echo '</table>'."\n";
}
// fin du tableau.
else echo '<br>Aucun Enregistrement';
// on libère le résultat
mysqli_free_result($result);
?>
</body>
</html> |