diff options
author | MaZderMind | 2015-03-31 21:56:40 +0200 |
---|---|---|
committer | MaZderMind | 2015-03-31 21:56:40 +0200 |
commit | dbd6cd8c14867fb02efc9b67adea2756cf223e4d (patch) | |
tree | ffd6569b9f80122c1f9ef913b79a629ec6cf8ea3 | |
parent | 69156f7cf1cc8e74425934677fff83b70799fe1b (diff) |
Restructure Feedback-Save-Code
Diffstat (limited to '')
-rw-r--r-- | view/feedback.php | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/view/feedback.php b/view/feedback.php index f603dbf..c4ba146 100644 --- a/view/feedback.php +++ b/view/feedback.php @@ -6,15 +6,16 @@ if(!$feedback->isEnabled()) $info = $_POST; -if(!$feedback->validate($info)) { - echo $tpl->render(array( - 'page' => 'feedback', - 'title' => 'Give Feedback', - 'room' => null, - )); -} -else +if($feedback->validate($info)) { $feedback->store($info); - echo 1; + + header('Content-Type: application/json'); + echo json_encode(true); + exit; } + +echo $tpl->render(array( + 'page' => 'feedback', + 'title' => 'Give Feedback', +)); |