How do you store what a player typed in an inputfield as a string?
You can set a public variable of type Text. In editor drag and drop your inputfield to that variable.
Than variableName.Text is what you are looking for.
Remember to using/import UnityEngine.UI