-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit.php
26 lines (21 loc) · 958 Bytes
/
edit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
if(isset($_POST['title']) && isset($_GET['bid'])){
updateEntry($_GET['bid'], $_POST['title'], $_POST['content']);
header("location: index.php?function=mein_blog&bid={$_GET['bid']}");
}
$blog = getEntry($_GET['bid']);
?>
<div id='edit'>
<form action="" method="POSt">
<h2 class='edit_titel'>Titel</h2>
<input name="title" value='<?php echo $blog['title']; ?>' type="text" class='edit_input' required>
<h2 class='edit_titel'>Text</h2>
<textarea name='content' type="text" class='edit_input' required><?php echo $blog['content']; ?></textarea>
<div class='edit_buttons'>
<button type="submit" class="button">Speichern</button>
<a href="index.php?function=mein_blog">
<div class="button"><p class="buttons_text">Abbrechen</p></div>
</a>
</div>
</form>
</div>