I should have added that i've seen some examples of ucwords, which is what I believe i should be using, but what is not clear to me is where/how to use it.
For example
GetSQLValueString ucwords(($_POST['fname'], "text")),
and
GetSQLValueString ($_POST[ucwords('fname')], "text"),
and
GetSQLValueString ($_POST(ucwords(['fname'])), "text"),
Seems obvious to me, but do not work.