Bonjour a tous, mon probleme est le suivant, j'ai un formulaire de modification et alors que tout me semble correct, rien ne se passe, aucunes modifications.
<?php
require_once('../connexion.php');
mysql_select_db($database,$db);
$incident=$_GET['incident'];/// Là tu récupère le code du matériel à modifier..
// requete retournant les informations sur l'incident à modifier
$sql2 = "SELECT * FROM incidents WHERE num_fiche='$incident'";
$resultsql = mysql_query($sql2) or die('Erreur SQL! '.$sql2.''.mysql_error()); // en cas d'erreure
$rep = mysql_fetch_assoc($resultsql);
?>
<table style="text-align: left; width: 100%;" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="height: 300px; width: 347px;"><img src="../logo_maif.jpg"></td>
<td><center><font face="arial" color='#01796F'><h1><b><u>Gestion des incidents éditiques</u></b></h1></center></td>
</tr>
</tbody>
</table>
<br>
<hr color='#01796F'/>
<hr color='#01796F'/>
<H2><FONT FACE="arial" COLOR='#01796F'><div align="center">Modification d'un incident</div></FONT></H2>
<hr/ color='#01796F'>
<font face="arial" color='#01796F'><b>Incident à modifier :</b>
<form name="form" action="ModificationIncidentOperateur.php?incident=<?php echo $_GET['incident'];?>" method="post">
<table style="width: 100%" align="center">
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Numéro fiche :</span></small></td>
<td><input type="text" name="ldnNum" size="40" value="<?php echo $rep['num_fiche'];?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Lien fiche :</span></small></td>
<td><input type="text" name="ldnlien" size="40" value="<?php echo $rep['lien_fiche'];?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Date :</span></small></td>
<td><input type="text" name="ldndate" size="40" value="<?php echo $rep['date_icdt'];?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Heure :</span></small></td>
<td><input type="text" name="ldnheure" size="40" value="<?php echo $rep['heure_icdt'];?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Déclarant :</span></small></td>
<?php
$employe=$rep['NumEmploye'];
$sql = "SELECT Nom FROM employer WHERE NumEmploye='$employe'"; //Requete permettant de savoir si la valeur est dans la base de donnees
$req = mysql_query($sql) or die('Erreur SQL! '.$sql.''.mysql_error()); // en cas d'erreure
$data = mysql_fetch_assoc($req); //les resultats de la requete est dans une variable
?>
<td><input type="text" name="ldndecl" size="40" value="<?php echo $data['Nom'];?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Majeur :</span></small></td>
<?php
$res = "";
if ( $rep['icdt_majeur'] == "0" )
{
$res = "Non";
}
else
{
$res = "Oui";
}
?>
<td><input type="text" name="ldnmaj" size="40" value="<?php echo $res;?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Impact Sociétaire :</span></small></td>
<?php
$res = "";
if ( $rep['ImpactSocietaire'] == "0" )
{
$res = "Non";
}
else
{
$res = "Oui";
}
?>
<td><input type="text" name="ldnmaj" size="40" value="<?php echo $res;?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Matériel :</span></small></td>
<?php
$materiel=$rep['CodeMateriel'];
$sql = "SELECT Nom FROM materiel WHERE CodeMateriel='$materiel'"; //Requete permettant de savoir si la valeur est dans la base de donnees
$req = mysql_query($sql) or die('Erreur SQL! '.$sql.''.mysql_error()); // en cas d'erreure
$data = mysql_fetch_assoc($req); //les resultats de la requete est dans une variable
?>
<td><input type="text" name="ldnmat" size="40" value="<?php echo $data['Nom'];?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Secteur :</span></small></td>
<?php
$secteur=$rep['CodeSecteur'];
$sql = "SELECT Nom FROM secteur WHERE CodeSecteur='$secteur'"; //Requete permettant de savoir si la valeur est dans la base de donnees
$req = mysql_query($sql) or die('Erreur SQL! '.$sql.''.mysql_error()); // en cas d'erreure
$data = mysql_fetch_assoc($req); //les resultats de la requete est dans une variable
?>
<td><input type="text" name="ldnsec" size="40" value="<?php echo $data['Nom'];?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Statut Incident :</span></small></td>
<?php
$res = "";
if ( $rep['CodeStatutIncident'] == "OUV" )
{
$res = "Ouvert";
}
elseif ( $rep['CodeStatutIncident'] == "COM" )
{
$res = "Pris en Compte";
}
elseif ( $rep['CodeStatutIncident'] == "FER" )
{
$res = "Fermé";
}
else
{
$res = "Ré-ouvert";
}
?>
<td><input type="text" name="ldnstati" size="40" value="<?php echo $res;?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Statut Production :</span></small></td>
<?php
$res = "";
if ( $rep['CodeStatutProd'] == "PBL" )
{
$res = "Bloquée";
}
elseif ( $rep['CodeStatutProd'] == "PNO" )
{
$res = "Normale";
}
else
{
$res = "Dégradée";
}
?>
<td><input type="text" name="ldnstatprod" size="40" value="<?php echo $res;?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Prestataire :</span></small></td>
<?php
$prestataire=$rep['CodePrestataire'];
$sql = "SELECT Nom FROM prestataire WHERE CodePrestataire='$prestataire'"; //Requete permettant de savoir si la valeur est dans la base de donnees
$req = mysql_query($sql) or die('Erreur SQL! '.$sql.''.mysql_error()); // en cas d'erreure
$data = mysql_fetch_assoc($req); //les resultats de la requete est dans une variable
?>
<td><input type="text" name="ldnpres" size="40" value="<?php echo $data['Nom'];?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Description :</span></small></td>
<td><input type="text" name="ldndesc" size="40" value="<?php echo $rep['descrip_icdt'];?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Intervenant :</span></small></td>
<td><input type="text" name="ldninter" size="40" value="<?php echo $rep['Intervenant'];?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Date résolution :</span></small></td>
<td><input type="text" name="ldndateresol" size="40" value="<?php echo $rep['date_resol'];?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Heure résolution :</span></small></td>
<td><input type="text" name="ldnheureresol" size="40" value="<?php echo $rep['heure_resol'];?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Description résolution :</span></small></td>
<td><input type="text" name="ldndescr" size="40" value="<?php echo $rep['descrip_resol '];?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Observation :</span></small></td>
<td><input type="text" name="ldnobserv" size="40" value="<?php echo $rep['observation'];?>"></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Motif de ré-ouverture :</span></small></td>
<td><input type="text" name="ldnreouv" size="40" value="<?php echo $rep['motif_r_icdt'];?>" disabled></td>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Numéro TeamTrack :</span></small></td>
<td><input type="text" name="ldnnumtt" size="40" value="<?php echo $rep['num_teamtrack'];?>" disabled></td>
</tr>
<tr>
<td style="width: 163px;"><small><span style="font-family: Arial; color:'#01796F'; font-weight: bold;">Remarque responsable :</span></small></td>
<td><input type="text" name="ldnremarque" size="40" value="<?php echo $rep['remarque_resp'];?>" disabled></td>
</tr>
</table>
<br>
<br>
<hr color='#01796F'/>
<br>
<center><input type="submit" name="modifier" value="Modifier"/></center>
<br>
<table style="width: 100%" border="0">
<tr>
<td style="width: 50%"><center><a href="../acceuil.php"><font face="arial" color='#01796F' size="2">Retour au menu</a></center></td>
<td><center><a href="ModifIncidentOperateur.php"><font face="arial" color='#01796F' size="2">Retour à la page précédente</a></center></td>
</tr>
</table>
</form>
<?php
if (isset($_POST['modifier']))
{
//allocation des variables
$numfiche=$_POST['ldnNum'];
$observ=$_POST['ldnobserv'];
echo $numfiche;
//requete
$query = "UPDATE incidents
SET observation='$observ'
WHERE num_fiche='$numfiche'";
$result = mysql_query($query) or die(mysql_error());
}
?>
ps: en espérant que quelqu'un sera m'aider, MERCI