prepare($sql); $stmt->bindValue(':title', $title, PDO::PARAM_STR); $stmt->bindValue(':status', $status, PDO::PARAM_STR); $stmt->bindValue(':xptype', $xptype, PDO::PARAM_STR); $stmt->bindValue(':tags', $tags, PDO::PARAM_STR); $stmt->bindValue(':description', $description, PDO::PARAM_STR); $stmt->bindValue(':duration', $duration, PDO::PARAM_STR); $stmt->bindValue(':image_url', $imageurl, PDO::PARAM_STR); $stmt->bindValue(':markdown', $markdown, PDO::PARAM_STR); $stmt->bindValue(':link_url', $link_url, PDO::PARAM_STR); if ($updatePdf) { $stmt->bindValue(':pdf_data', $pdfData, $pdfData === null ? PDO::PARAM_NULL : PDO::PARAM_LOB); $stmt->bindValue(':pdf_filename', $pdfFilename, $pdfFilename === null ? PDO::PARAM_NULL : 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 de l experience :" . $e->getMessage()); } // Log Discord sendLog("Modification de l'expérience : " . $title . " (id " . $id . ")"); // On renvoie l'utilisateur sur admin.php header('Location: ../pages/admin.php'); exit;