Update updateArticle.php

This commit is contained in:
2026-06-01 12:33:13 +02:00
parent c440c25e41
commit cd38af22db
+20 -3
View File
@@ -51,9 +51,20 @@ include_once 'php/controller/showArticle-controller.php';
<?php <?php
unset($_SESSION["message"]); unset($_SESSION["message"]);
?> ?>
<input type="text" id="title" name="title" value="<?php if (isset($title) && !empty($title)){echo htmlspecialchars($title);} ?>" placeholder="Titel hier eingeben" required> <input type="text" id="title" name="title"
value="<?php
if (isset($title) && !empty($title)){echo htmlspecialchars($title);}
echo htmlspecialchars($_SESSION['old_title'] ?? '');
unset($_SESSION['old_title']);
?>"
placeholder="Titel hier eingeben" required>
<textarea id="content" name="content" placeholder="Schreibe deinen Beitrag..."> <textarea id="content" name="content" placeholder="Schreibe deinen Beitrag...">
<?php if (isset($content) && !empty($content)){echo htmlspecialchars($content);} ?> <?php
if (isset($content) && !empty($content)){echo htmlspecialchars($content);}
echo htmlspecialchars($_SESSION['old_content'] ?? ''); unset($_SESSION['old_content']);
?>
</textarea> </textarea>
</main> </main>
@@ -111,7 +122,13 @@ include_once 'php/controller/showArticle-controller.php';
<div class="sidebar-block"> <div class="sidebar-block">
<label for="tags">Schlagwörter</label> <label for="tags">Schlagwörter</label>
<input type="text" id="tags" name="tags" value="<?php if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags);} ?>" placeholder="z.B. Technik, IT (mit Komma trennen)"> <input type="text" id="tags" name="tags"
value="<?php
if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags);}
echo htmlspecialchars($_SESSION['old_tags'] ?? ''); unset($_SESSION['old_tags']); ?>
?>"
placeholder="z.B. Technik, IT (mit Komma trennen)">
</div> </div>
</aside> </aside>