save registration data to database