writing 3 variable fields to database