AJAX-to-DB partially implemented