Line 19 calls the Playerinfo() function and stores the return string in the string variable fullName.
Right after that you call Playerinfo() again on line 21, which executes the function in its entirety a second time, hence going through the name prompt a second time.