add basic post functionality

This commit is contained in:
Hendrik
2017-01-26 11:35:18 +01:00
parent f06de1e88d
commit 328f0665f3
5 changed files with 40 additions and 6 deletions

View File

@@ -21,8 +21,9 @@ echo("
<div class='post-comments'>
<div class="commentfield">
<form name="newcomment" method="post">
<textarea placeholder="Laat een reactie achter..."></textarea> <br>
<form action="API/postComment.php" name="newcomment" method="post">
<input type="hidden" name="postID" value="<?= $postID ?>">
<textarea name="newcomment-content" Laat een reactie achter..."></textarea> <br>
<input type="submit" value="Reageer!">
</form>
</div>

View File

@@ -58,9 +58,9 @@
if ($_SESSION["userID"] === $userID) {
?>
<div class="post platform">
<form>
<input type="text" class="newpost" placeholder="Titel">
<textarea class="newpost" placeholder="Schrijf een berichtje..."></textarea>
<form action="API/postPost.php" method="post">
<input type="text" name="newpost-title" class="newpost" placeholder="Titel">
<textarea class="newpost" name="newpost-content" placeholder="Schrijf een berichtje..."></textarea>
<input type="submit" value="Plaats!">
</form>
</div>