Update updateArticle.php

This commit is contained in:
NOrtmann1
2026-06-10 15:54:12 +02:00
parent d5fdc9383f
commit cd6aa80f59
+6 -4
View File
@@ -79,10 +79,11 @@ include_once 'php/controller/showArticle-controller.php';
placeholder="Titel hier eingeben" required> placeholder="Titel hier eingeben" required>
<textarea id="content" name="content" placeholder="Schreibe deinen Beitrag..."> <textarea id="content" name="content" placeholder="Schreibe deinen Beitrag...">
<?php <?php
if (isset($content) && !empty($content)){echo htmlspecialchars($content); if (isset($_SESSION['old_content']) && !empty($_SESSION['old_content'])){
}elseif (isset($_SESSION['old_content']) && !empty($_SESSION['old_content'])){
echo htmlspecialchars($_SESSION['old_content']); echo htmlspecialchars($_SESSION['old_content']);
unset($_SESSION['old_content']); unset($_SESSION['old_content']);
}elseif (isset($content) && !empty($content)){
echo htmlspecialchars($content);
} }
?> ?>
</textarea> </textarea>
@@ -144,10 +145,11 @@ include_once 'php/controller/showArticle-controller.php';
<label for="tags">Schlagwörter</label> <label for="tags">Schlagwörter</label>
<input type="text" id="tags" name="tags" <input type="text" id="tags" name="tags"
value="<?php value="<?php
if (isset($tags) && !empty($tags)){echo htmlspecialchars($tags); if (isset($_SESSION['old_tags']) && !empty($_SESSION['old_tags'])){
} elseif (isset($_SESSION['old_tags']) && !empty($_SESSION['old_tags'])){
echo htmlspecialchars($_SESSION['old_tags']); echo htmlspecialchars($_SESSION['old_tags']);
unset($_SESSION['old_tags']); unset($_SESSION['old_tags']);
} elseif (isset($tags) && !empty($tags)){
echo htmlspecialchars($tags);
} }
?>" ?>"
placeholder="z.B. Technik, IT (mit Komma trennen)"> placeholder="z.B. Technik, IT (mit Komma trennen)">