echo "<form name='formulaire' method='POST'>";
// par
echo "<form action=# name='formulaire' method='POST'>";
et apres j'avoue que je vois pas autre chose
echo "<input type=hidden name='liste' value='".$liste."'>" ;
// dans ce formulaire
echo "<form name='form' method='POST'>";
echo "<input type=hidden name='liste' value='".$liste."'>" ;
echo "Nom :";
echo "<input type='text' name='nom' size='50' maxlength='50' value='";
echo $r_nom;
echo "Rue :";
echo "<input name='rue' type='text' size='100' maxlength='150' value='";
echo $r_rue;
echo "'>";
echo "</form><br>";
enfin j'espere Code : Tout sélectionner
$liste = $_POST['liste'] ? $_POST['liste'] : "" ;
echo "<div class='form-ligne'>";
echo "<div class='label'>Site :</div>";
echo "<div class='champ'><input name='site' type='text' size='50' maxlength='100' title='Saisir l adresse du site web du fabricant' value='";
echo $r_site;
echo "'></div>";
echo "</div>";
echo "<div class='form-ligne'>";
echo "<div class='boutons'>";
echo "<input type='submit' name='modif' value='Modifier'>";
echo "</div>";
echo "</div>";
echo "</form><br>";
if(isset($_POST['modif']))
{
if(($_POST['nom']==NULL) && ($_POST['nom']=="<br />")){echo "<font color='red'>Le nom du fabricant est obligatoire.</font>";}
$nom = htmlspecialchars($_POST['nom'], ENT_QUOTES);
$rue = htmlspecialchars($_POST['rue'], ENT_QUOTES);
$ville = htmlspecialchars($_POST['ville'], ENT_QUOTES);
$sql = "UPDATE `fabricant` SET `fab_rue`='".$rue."', `fab_cp`=".$_POST['cp'].", `fab_ville`='".$ville."', `fab_tel`='".$_POST['tel']."',
`fab_fax`='".$_POST['fax']."', `fab_site`='".$_POST['site']."', `fab_mail`='".$_POST['mail']."' WHERE `fab_nom`='".$liste."' ";
mysql_query("$sql") or die("<font color='red'>Invalid query : ".mysql_error()."</font>");
if($sql){echo "<font color='green'>Fabricant modifié.</font>";}
}Code : Tout sélectionner
if(isset($_POST['modif']))Code : Tout sélectionner
$liste = $_POST['liste'] ? $_POST['liste'] : "" ;
Code : Tout sélectionner
$liste = $_POST['liste'] ? $_POST['liste'] : "" ;