change comments to use ajax
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user