Eingabevalidierung #16
@@ -51,9 +51,20 @@ include_once 'php/controller/showArticle-controller.php';
|
||||
<?php
|
||||
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...">
|
||||
<?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>
|
||||
</main>
|
||||
|
||||
@@ -111,7 +122,13 @@ include_once 'php/controller/showArticle-controller.php';
|
||||
|
||||
<div class="sidebar-block">
|
||||
<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>
|
||||
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user