Je veut bien mais il y ' a pas mal de ligne
(ps : le code vient d'un formulaire de cyrano que j'ais pris pour adapter a mes besoins

voila lol )
<body>
<?php
$host = '*****';
$user = '*****';
$pass = '*****';
$db = '*****';
// connection à la DB
$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
mysql_select_db($db) or die ('Erreur :'.mysql_error());
$id =$_GET['id'];
$select = "SELECT * FROM produit2 WHERE reference LIKE '$id'";
$result = mysql_query($select,$link) or die ('Erreur : '.mysql_error() );
$row = mysql_fetch_assoc($result);
$nom = 'nom';
$formule = 'formule';
$reference = 'reference';
$num = $row['numero_cass'];
if(isset($_POST['envoi']))
{
$quantite=$_POST['quantite'];
$fournisseur = $_POST['fournisseur'];
$nombre_quantite=$_POST['nombre_quantite'];
$prix=$_POST['prix'];
$date = date("d-m");
if ($prix == '' || $nombre_quantite == '' || $quantite == '' || $fournisseur == '')
{
?>
<h3>Informations incomplètes</h3>
<p>Un (ou plusieurs) champ(s) n'a(ont) pas été correctement rempli(s).</p>
<ol>
<?php
if ($prix == '') // Si le champ "prix" est vide,
{ print "<li>Vous n'avez pas précisé le prix de la molecule</li>\n";}
if ($quantite == '') // Si le champ "quantite" est vide,
{ print "<li>Vous n'avez pas précisé la quantite de molecule par lot</li>\n";}
if ($nombre_quantite == '') // Si le champ "nombre_quantite" est vide,
{ print "<li>Vous n'avez pas précisé le nombre de lot de molecule a commander</li>\n";}
if ($fournisseur == '') // Si le champ "fournisseur" est vide,
{ print "<li>Vous n'avez pas précisé le fournisseur pour ce produit</li>\n";}
?>
</ol>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
<table summary="">
<col width="250" title="titres" />
<col width="15" title="oblige" />
<col width="250" title="donnees" />
<tr width="30%" height="15"><td><b>Nom de la molécule :</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php ".$row['nom']." ?></b></td></tr>
<tr width="30%" height="29"><td><b>Formule brute de la molecule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['formule']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Localisation de la Molécule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['localisation']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Disponibilité :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['disponibilite']."?></b></td></tr>
<tr width="30%" height="15"><td><b>Quantité en reserve :</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><input type="text" name="quantite"></b></td></tr>
<tr width="30%" height="29"><td><b>Reference de la molecule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['reference']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Numero de CAS:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['numero_cass']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Toxicite :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['toxicite']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Fournisseur:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold">*</div></td>
<td width="30%" height="29"><select name="fournisseur">
<option value="acros">Acros</option>
<option value="aldricht">Aldricht</option>
<option value="sigma">Sigma</option>
<option value="lancaster">Lancaster</option>
<option value="sigma">Fluka</option>
<option value="lancaster">Strem</option>
<option value="autres">autres</option>
</select></td>
<tr width="30%" height="29"><td><b>Autres Fournisseur:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><input type="text" name="nouveau_fournisseur"></b></td></tr>
<tr width="30%" height="29"><td><b>Quantité unitaire :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold">*</div></td>
<td><b><input type="text" name="quantite"></b></td></tr>
<tr width="30%" height="29"><td><b>Nombres d'unités:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold">*</div></td>
<td><b><input type="text" name="nombre_quantite"></b></td></tr>
<tr width="30%" height="29"><td><b>Prix unitaire :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold">*</div></td>
<td><b><input type="text" name="prix">€</b></td></tr>
<tr><td colspan="3"><div style="text-align:center;"><input type="submit" class="verif" name="envoi" value="Envoyer" />
<input type="reset" class="verif" value="Tout effacer" /><input type="submit" value="Imprimer" onclick="print();"></div></td></tr>
</TABLE></form>
<?php
}
else
{
print "<h3>Merci ! Voici les informations que vous avez fournies</h3>\n";
print "<p>Informations sur la nouvelle molecule:</p>\n";
print "<b>Son nom :</b>".$nom."<br />\n";
print "<b>Sa formule Brute :</b>".$formule."<br />\n";
print "<b>Sa localisation :</b>".$localisation."<br />\n";
print "<b>Sa quantite en reserve :</b>".$quantite."<br />\n";
print "<b>Sa reference :</b>".$reference."<br />\n";
print "<b>Son numero de CAS :</b>".$numero_cass."<br />\n";
if ($toxicite !==''){
print "<b>Sa toxicite s'il y en a une :</b> ".$toxicite."<br />\n";}
print "<b>Son fournisseur :</b>".$fournisseur."<br />\n";
print "<b>Sa Quantité unitaire :</b>".$quantite."<br />\n";
print "<b>Le nombre d'unité a commander :</b>".$nombre_quantite."<br />\n";
print "<b>Son Prix :</b>".$prix."<br />\n";
print("<p>Retour vers l'index de recherche, cliquez <a href=\"recherche.php\" title=\"Retour vers le formulaire de recherche\">ICI</a></p>");
print("<p>Retour vers l'Index, cliquez <a href=\"index.html\" title=\"Retour a l'index\">ICI</a></p>");
$host = '****';
$user = '****';
$pass = '****';
$db = '****';
// connection à la DB
$link = mysql_connect ($host,$user,$pass) or die ('Erreur : '.mysql_error() );
mysql_select_db($db) or die ('Erreur :'.mysql_error());
$fournisseur='';
if(isset($_POST['nouveau_fournisseur'])){
if(strcmp($_POST['nouveau_fournisseur'],'')!=0){
$fournisseur=$_POST['nouveau_fournisseur'];
}else{
$fournisseur=$_POST['fournisseur'];
}
}
$select2 = "SELECT * FROM produit2 WHERE reference LIKE '$id'";
$result2 = mysql_query($select2,$link) or die ('Erreur : '.mysql_error() );
$row2 = mysql_fetch_assoc($result2);
$nom2 = $row2['nom'];
$numero_cass2 = $row2['numero_cass'];
$fournisseur = addslashes($fournisseur);
$quantite = addslashes($quantite);
$nombre_quantite= addslashes($nombre_quantite);
$prix= addslashes($prix);
$numero_cass2= addslashes($numero_cass2);
$nom2= addslashes($nom2);
$date= addslashes($date);
if(($quantite !="")&&($prix !="")&&($nombre_quantite !=""))
{
$query="INSERT INTO commande (fournisseur,quantite,nombre_quantite,prix,numero_cass,nom,date) VALUES ('".$fournisseur."', '".$quantite."', '".$nombre_quantite."', '".$prix."','".$numero_cass2."','".$nom2."','".$date."');";
mysql_query($query) or die (mysql_error);
}
}
/* Si cette page s'ouvre pour la première fois sans que le bouton soumettant le formulaire n'ait
été cliqué, alors on affiche le formulaire normalement */
else
{
?>
<H3><strong>Formulaire de commande de produits</strong></H3>
<p>Notez que les champs précédés d'une <span style="color: #ff0000; text-align: center; font-weight: bold">*</span> doivent obligatoirement être remplis.</p>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
<table summary="">
<col width="250" title="titres" />
<col width="15" title="oblige" />
<col width="250" title="donnees" />
<tr width="30%" height="15"><td><b>Nom de la molécule :</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php ".$row['nom']." ?></b></td></tr>
<tr width="30%" height="29"><td><b>Formule brute de la molecule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['formule']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Localisation de la Molécule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['localisation']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Disponibilité :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['disponibilite']."?></b></td></tr>
<tr width="30%" height="15"><td><b>Quantité en reserve :</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><input type="text" name="quantite"></b></td></tr>
<tr width="30%" height="29"><td><b>Reference de la molecule:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['reference']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Numero de CAS:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['numero_cass']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Toxicite :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold"></div></td>
<td><b><?php".$row['toxicite']."?></b></td></tr>
<tr width="30%" height="29"><td><b>Fournisseur:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold">*</div></td>
<td width="30%" height="29"><select name="fournisseur">
<option value="acros">Acros</option>
<option value="aldricht">Aldricht</option>
<option value="sigma">Sigma</option>
<option value="lancaster">Lancaster</option>
<option value="sigma">Fluka</option>
<option value="lancaster">Strem</option>
<option value="autres">autres</option>
</select></td>
<tr width="30%" height="29"><td><b>Autres Fournisseur:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold"></div></td>
<td><b><input type="text" name="nouveau_fournisseur"></b></td></tr>
<tr width="30%" height="29"><td><b>Quantité unitaire :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold">*</div></td>
<td><b><input type="text" name="quantite"></b></td></tr>
<tr width="30%" height="29"><td><b>Nombres d'unités:</td>
<td><div style="color: #ff0000; text-align: center; font-weight: bold">*</div></td>
<td><b><input type="text" name="nombre_quantite"></b></td></tr>
<tr width="30%" height="29"><td><b>Prix unitaire :</b></td>
<td><div style="color: #ffffff; text-align: center; font-weight: bold">*</div></td>
<td><b><input type="text" name="prix">€</b></td></tr>
<tr><td colspan="3"><div style="text-align:center;"><input type="submit" class="verif" name="envoi" value="Envoyer" />
<input type="reset" class="verif" value="Tout effacer" /><input type="submit" value="Imprimer" onclick="print();"></div></td></tr>
</TABLE></form>
<?php
}
?>
</BODY>