public function _replyto($id) { $comment = new comments(); $comment->UserId = $_SESSION["USERID"]; $comment->Time = date("Y-m-d H:i:s", time()); $comment->CommentText = $_GET['str']; $comment->ReplyID = $id; $comment->saveToReply(); echo json_encode(array("success")); }