Stop before Genius Bar visit

This commit is contained in:
Marijn Jansen
2017-01-26 17:03:11 +01:00
parent cdfbcc0168
commit 7073995534
4 changed files with 77 additions and 9 deletions

View File

@@ -5,14 +5,24 @@ session_start();
require("../../queries/post.php");
require("../../queries/connect.php");
require("../../queries/checkInput.php");
if (empty($_POST['newcomment-content'])) {
echo 0;
} else {
if(makeComment($_POST['postID'],
$_SESSION['userID'],
test_input($_POST['newcomment-content']))) {
if ($_POST["button"] == "reaction") {
if (empty($_POST['newcomment-content'])) {
echo 0;
} else {
if (makeComment($_POST['postID'],
$_SESSION['userID'],
test_input($_POST['newcomment-content']))) {
echo 1;
} else {
echo 0;
}
}
} elseif ($_POST["button"] == "nietslecht") {
if (makeNietSlecht($_POST["postID"], $_SESSION["userID"])) {
echo 1;
} else {
echo 0;
}
} else {
echo 0;
}