Eingabevalidierung #16
@@ -47,10 +47,10 @@ session_start();
|
||||
unset($_SESSION["message"]);
|
||||
?>
|
||||
<input type="text" id="title" name="title"
|
||||
value="<?php if (isset($_SESSION['old_title'])){echo htmlspecialchars($_SESSION['old_title'] ?? '');} unset($_SESSION['old_title']); ?>"
|
||||
value="<?php 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($_SESSION['old_content'])){echo htmlspecialchars($_SESSION['old_content'] ?? '');} unset($_SESSION['old_content']); ?>
|
||||
<?php echo htmlspecialchars($_SESSION['old_content'] ?? ''); unset($_SESSION['old_content']); ?>
|
||||
</textarea>
|
||||
</main>
|
||||
|
||||
@@ -109,7 +109,7 @@ session_start();
|
||||
<div class="sidebar-block">
|
||||
<label for="tags">Schlagwörter</label>
|
||||
<input type="text" id="tags" name="tags"
|
||||
value="<?php if(isset($_SESSION['old_tags'])){ echo htmlspecialchars($_SESSION['old_tags'] ?? '');} unset($_SESSION['old_tags']); ?>"
|
||||
value="<?php echo htmlspecialchars($_SESSION['old_tags'] ?? ''); unset($_SESSION['old_tags']); ?>"
|
||||
placeholder="z.B. Technik, IT (mit Komma trennen)">
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user