Writing the ajax to post chat messages to the database