I\'m using an ajax request to send comments to DB. Succesful response is marked by
1. OK
The problem actually is that the response from the
in your classQuote.php
?>
?>
tag exists somewhere in the lines of code (follow flow from your __construct and where you invoke stuff)Infact, it could prove helpful to leave out the closing tag. Another possibility is this:
// capture output
ob_start();
require_once($ABS_APPS."/quotes/classQuote.php");
$quote = new Quote();
$quoteData = $quote->get($_POST["entryId"]);
// If user comments his own entry we don't have to send the notification
if($quoteData["UserAuthor"] != $_SESSION["User"]){
$notification->newComment($_POST["username"], $quoteData["UserAuthor"], $_POST["entryId"], $_POST["app"]);
// trim whitespace
echo trim(ob_get_clean());
}