S'il vous plait j'ai besoin de votre aide: j'ai un problème dans mon code php, code de modification on m'affiche une erreur et je ne sais ou est l'erreur, voila le code :
modifier1.php
<?php
include('connect.inc');
$numero = $_GET["numero"] ;
//requête SQL:
$sql = "SELECT *
FROM immobilisation
WHERE numero = ".$numero ;
//exécution de la requête:
$requete = mysql_query( $sql) ;
//affichage des données:
if( $row = mysql_fetch_array( $requete ) )
{
?>
<form name="insertion" action="modification.php" method="POST">
<input type="hidden" name="numero" value="<?php echo($numero) ;?>">
<table border="0" align="center" cellspacing="2" cellpadding="2">
<tr align="center">
<td>Numéro locomotive</td>
<td><input type="text" name="numeroloco" value="<?php echo($row->numeroloco) ;?>"></td>
</tr>
<tr align="center">
<td>Date de réforme</td>
<td><input type="text" name="datedereforme" value="<?php echo($row->datedereforme) ;?>"></td>
</tr>
<tr align="center">
<td>Lieu</td>
<td><input type="text" name="lieu" value="<?php echo($row->lieu) ;?>"></td>
</tr>
<tr align="center">
<td>Date d'entrée</td>
<td><input type="text" name="cdatedentree" value="<?php echo($row->datedentree) ;?>"></td>
</tr>
<tr align="center">
<td>Motif</td>
<td><input type="text" name="motif" value="<?php echo($row->motif) ;?>"></td>
</tr>
<tr align="center">
<td>Opération</td>
<td><input type="text" name="operation" value="<?php echo($row->operation) ;?>"></td>
</tr>
<tr align="center">
<td>Situation</td>
<td><input type="text" name="situation" value="<?php echo($row->situation) ;?>"></td>
</tr>
<tr align="center">
<td>Date prévision</td>
<td><input type="text" name="dateprevision" value="<?php echo($row->dateprevision) ;?>"></td>
</tr>
<tr align="center">
<td>Date de sortie</td>
<td><input type="text" name="datedesortie" value="<?php echo($row->datedesortie) ;?>"></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" value="modifier"></td>
</tr>
</table>
</form>
<?php
}//fin if
?>
modification.php
<?php
include('connect.inc');
$numeroloco = $_POST["numeroloco"] ;
//prenom:
$datedereforme = $_POST["datedereforme"] ;
//adresse:
$lieu = $_POST["lieu"] ;
//code postal:
$datedentree = $_POST["datedentree"] ;
//numéro de téléphone:
$motif = $_POST["motif"] ;
$operation = $_POST["operation"] ;
$situation = $_POST["situation"] ;
$dateprevision = $_POST["dateprevision"] ;
$datedesortie = $_POST["datedesortie"] ;
//récupération de l'identifiant de la personne:
$numero = $_POST["numero"] ;
//création de la requête SQL:
$sql = "UPDATE immobilisation
SET numeroloco = '$numeroloco',
datedereforme = '$datedereforme',
lieu = '$lieu',
datedentree = '$datedentree',
motif = '$motif'
operation = '$operation'
situation = '$situation'
dateprevision = '$dateprevision'
datedesortie = '$datedesortie'
WHERE numero = '$numero' " ;
//exécution de la requête SQL:
$requete = mysql_query($sql) or die( mysql_error() ) ;
//affichage des résultats, pour savoir si la modification a marchée:
if($requete)
{
echo("La modification à été correctement effectuée") ;
}
else
{
echo("La modification à échouée") ;
}
?>
Voila l'erreur qu'on affiche :Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Project\modifier1.php on line 16
Merci pour votre aide