I try to edit an image in my data base but I have a error message : Notice: Undefined index: id
$id = $_GET['id'];
I am capable to add an image but I would like to know how to update an image ???
<?php
// Connexion à la base de donnée
include('config_bd.php');
// Vérifications des inputs
if(isset($_POST['upload'])){
    move_uploaded_file($_FILES["image"]["tmp_name"],"images/" .basename($_FILES['image']['name']));
    $nom = htmlspecialchars($_POST['nom']);
    $image = htmlspecialchars($_FILES['image']['name']);
    if(empty($nom) || empty($image)){
        if(empty($nom)) {
            echo "<font color='red'>Le champ nom est vide.</font><br/>";
        }
        if(empty($image)) {
            echo "<font color='red'>Le champ image est vide.</font><br/>";
        }
    }else{
        $update = mysqli_query($mysqli, "UPDATE clubs SET nom='$nom',image='$image'WHERE id='$id'");
        echo "<font color='green'>L'entrée a été enregistré!.";
        echo "<br/><a href='view.php'>Consulter</a>";
           }
    }
$id = $_GET['id'];
$select = mysqli_query($mysqli, "SELECT * FROM clubs WHERE id='$id' ");
while($res = mysqli_fetch_array($select)){
    echo "<div id='img_div'>";
    echo "<p>" .$res['nom']."</p>";
    echo "<img src='images/" .$res['image']."'>";
    echo "</div>";
}
?>
<!DOCTYPE html>
<html lang="fr">
    <head>
        <meta charset="utf-8">
        <title>Titre de la page</title>
        <link rel="stylesheet" href="style1.css">
        <script src="script.js"></script>
    </head>
    <body>
        <form method="post" action="edit.php" enctype="multipart/form-data">
                <input type="text" name="nom" >
                <input type="file" name="image"><br /><br />
                <input type="submit" name="upload" value="Upload Image">
                <input type="hidden" name="id" value=<?php echo $_GET['id'];?>>
            </form>
    </body>
</html>
Thank you a lot for a potential answer.
