<?php
function error($txt) {
echo json_encode(array('success' => false, 'txt' => $txt));
exit;
}
function success($txt) {
echo json_encode(array('success' => true, 'txt' => $txt));
?>