change comments to use ajax

This commit is contained in:
Hendrik
2017-01-26 12:21:01 +01:00
parent 328f0665f3
commit 91aca6baa7
5 changed files with 30 additions and 18 deletions

View File

@@ -5,12 +5,14 @@ session_start();
require("../../queries/post.php");
require("../../queries/connect.php");
require("../../queries/checkInput.php");
if (empty($_POST['newcomment-content'])) {
echo 0;
} else {
makeComment($_POST['postID'],
if(makeComment($_POST['postID'],
$_SESSION['userID'],
test_input($_POST['newcomment-content']));
}
header("Location: ../profile.php");
test_input($_POST['newcomment-content']))) {
echo 1;
} else {
echo 0;
}
}