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
|
if($result) {
// debut du tableau
echo '<form action="confirmation.php" method="post">';
echo '<table bgcolor="#FFFFFF" align="center">'."\n";
// première ligne on affiche les titres dans 4 colonnes
echo '<tr>';
echo '<td width="80" bgcolor="#9f9f9f"><b><u>id</u></b></td>';
echo '<td bgcolor="#9f9f9f"><b><u>departement</u></b></td>*;*';
echo '<td bgcolor="#9f9f9f"><b><u>commentaires</u></b></td&g***t;';
echo '</tr>'."\n";
// lecture et affichage des résultats sur 4 colonnes, 1 résultat par ligne.
$i=0;
while($row = mysql_fetch_array($result)) {
echo '<tr>';
echo '<td width="80" bgcolor="#d4d4d4">'.$row['id'].'</td>';
echo '<td bgcolor="#d4d4d4">'.$row['departement'].'</td>';
echo '<td bgcolor="#d4d4d4">'.$row['commentaires'].'</td>';
echo '<td><input type="checkbox" name="option'.$i.'" value="acheter">acheter<br></td>'."\n";
echo '</tr>'."\n";
$i = $i +1;
}
echo '</table>'."\n";
echo "<input type='submit' value='Commander Devis' /></form>";
// fin du tableau.
}
else echo 'Pas d\'enregistrements dans cette table...';
?> |
Partager