Added the code to save the POST to database