How to validate a questionary form from the previously submitted data with in the same form in survey

e.g first i have this questions and must submitted (family informaton
)
first family name
middle family name
las famely name
then i have questions the following
(child information)
first name of child
middle name of child
last name of child
my question is i want to to make sure that the family information is in database and next i will register the child information