prepare(' UPDATE projects SET title = :title, tags = :tags, description = :description, image_url = :image_url WHERE id = :id '); $stmt->bindValue(':title', $title, PDO::PARAM_STR); $stmt->bindValue(':tags', $tags, PDO::PARAM_STR); $stmt->bindValue(':description', $description, PDO::PARAM_STR); $stmt->bindValue(':image_url', $imageurl, PDO::PARAM_STR); $stmt->bindValue(':id', $id, PDO::PARAM_INT); $stmt->execute(); // Sinon on renvoie l'erreur } catch (PDOException $e) { die("Erreur lors de la modification du projet :" . $e->getMessage()); } // On renvoie l'utilisateur sur admin.php header('Location: ../pages/admin.php'); exit;