saves form info to db