create save method which save inputted data to database(Note: Should implement validation)