adding database select via AJAX