deleteArticle()
This commit is contained in:
@@ -93,6 +93,9 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<?php include_once "includes/alertMessages.php"?>
|
||||
|
||||
<h2 class="section-title">Meine Beiträge</h2>
|
||||
|
||||
<div class="articles-list">
|
||||
@@ -151,6 +154,15 @@ $isEditMode = (isset($_GET["edit"]) && $_GET["edit"] === "1") || !empty($error);
|
||||
class="edit-link-button">
|
||||
Bearbeiten
|
||||
</a>
|
||||
|
||||
<form action="/php/controller/deleteArticle-controller.php" method="POST">
|
||||
<input type="hidden" name="id" value="<?php echo htmlspecialchars($userArticle->getID()); ?>">
|
||||
|
||||
<button type="submit" class="edit-link-button" onclick="return confirm('Möchtest du diesen Artikel wirklich löschen?');">
|
||||
Löschen
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user