changed insertPost function to update database and return to home.html