You could use a system which allocates memory for a new node in the Linked List only if it passes your condition. ie. If the name entered is an empty string, then just dont allocate memory for a new node.

char name_str[20]; // Its just hardcoded here for convenience

for(; {
printf("\n Enter the name\n");
scanf("%s", name_str);
if(strcmp(name_str, '')) {
break; <<<<<< Here u break off from the loop if name is a null String

// Similarly get the other elements also from the user

//if all is fine , u actually allocate memory for the node using malloc and add it to the list using ur API's.


HTH. If not i can explain in detail :-)