collect chat to database via ajax