Getting the data to save out to the database.