This is a php code i wrote to edit a line in an array "article" every line is compsed by:
(Colonne:     Type)            
(ref     : int(11),
nom   :varchar(25),
cat :  varchar(25),
prix     : int(11),
fabricant : varchar(35),
photo     :varchar(35))
so i make this php code:
      <?php
require_once("connection.php");
$ref=$_POST['ref'];
$req="Select * from article where ('ref =". $ref."')";
$rs= mysql_query($req) or die(mysql_error());
$AR=mysql_fetch_assoc($rs);
?>
    <html>
    <head>
        <meta charset="utf-8">
    </head>
    <body>
    <form method="POST" action="modifierArticle.php" enctype="multipart/form-data">
        <table>
            <tr>
                <td>Référence:</td>
                <td><input type="text" name="ref" value="<?php echo ($AR['ref']) ?>" readonly="true"></td>
            </tr>
            <tr>
                <td>Nom:</td>
                <td><input type="text" name="nom" value="<?php echo ($AR['nom']) ?>"></td>
            </tr>
            <tr>
                <td> Catégorie:  </td>
                <td><input type="text" name="cat" value="<?php echo ($AR['cat']) ?>"></td>
            </tr>
            <tr>
                <td> Prix Unitaire:  </td>
                <td><input type="text" name="prix" value="<?php echo ($AR['prix']) ?>"></td>
            </tr>
            <tr>
                <td> Fabricant:  </td>
                <td><input type="text" name="fab" value="<?php echo ($AR['fabricant']) ?>"></td>
            </tr>
            <tr>
                <td>Photo: </td>
                <td><input type="file" name="photo"><img src="./images/<?php echo ($AR['photo']) ?>"</td>
            </tr>
            <tr>
                <td></td>
                <td> <input type="submit" value="Enregistrer"></td>
            </tr>
        </table>
    </form>
    </body>
    </html>
<?php
mysql_free_result($rs);
mysql_close($conn);
?>
so i got an error:
Notice: Undefined index:
refin ...\editerArticle.php on line 3Notice: Undefined index:
refin ...\editerArticle.php on line 3
 
     
     
     
     
    