Save sent data to database