Got a diary page working and adding data to db using ajax