seeing it is tagged PHP:
either
string ucfirst ( string $str );
to uppercase first letter of the first word
or
string ucwords ( string $str );
to uppercase the first letter of every word
you might want to use those in combination with
string strtolower ( string $str );
to normalize all names to lower case first.