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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
| <?php
mysql_connect("localhost", "root", "");
mysql_select_db("p2i");
$reponse = mysql_query("SELECT * FROM commandes_dsi"); // Requête SQL
while ($donnees = mysql_fetch_array($reponse) )
{
?>
<html>
<form method="POST">
<center>
<p><br>
<br>
<br>
</p>
<table width="200" border="1">
<tr>
<td><img src="banniere_dsi.jpg" width="800" height="160"></td>
</tr>
<tr>
<td height="500" bgcolor="#9EC2E4"> <center>
<p><strong>Recherche par nom : </strong>
<?php
$sql = " SELECT distinct nom FROM commandes_dsi ";
$result = mysql_query($sql) or die("Requete pas comprise");?>
<select name="liste_nom" id="liste_nom">
<?php while ($row=mysql_fetch_array($result))
{
echo"<option>$row[0]</option>";
}?>
</select>
</p>
<table width="288" border="0">
<tr>
<td><strong>Nom </strong></td>
<td><input name="nom" type="text" id="date4" value="<?php echo $donnees['nom']; ?>" size="20" maxlength="35"></td>
</tr>
<tr>
<td><strong>Date</strong></td>
<td><input name="date" type="text" id="date" value="<?php echo $donnees['date']; ?>" size="20" maxlength="35"> </td>
</tr>
<tr>
<td><strong>Fournisseur</strong></td>
<td><input name="fournisseur" type="text" id="fournisseur3" value="<?php echo $donnees['fournisseur']; ?>" size="20" maxlength="70"></td>
</tr>
<tr>
<td><strong>Commande</strong></td>
<td><textarea name="commande" id="textarea" value="<?php echo $donnees['commande']; ?>"><?php echo $donnees['commande']; ?></textarea></td>
</tr>
<tr>
<td><strong>Commentaire</strong></td>
<td><textarea name="commentaire" id="commentaire" value="<?php echo $donnees['commentaire']; ?>"><?php echo $donnees['commentaire']; ?></textarea></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</center></td>
</tr>
</table>
<p> </p>
<p> <br>
<br>
</p>
</center>
</form>
</html>
<?php
}
mysql_close(); // Déconnexion de MySQL
?> |