update attendance script to update if record already exists