PHP ucword mysql插入

I am having a problem capiltalizing the first letter of the "ondeck" insert. I am trying to use ucwords but I am unsure of where to put that in the following statement:

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
$insertSQL = sprintf("INSERT INTO updates (windowStatus, onDeck, updateComments, username) VALUES (%s, %s, %s, %s)",
                   GetSQLValueString($_POST['windowStatus'], "text"),
                   GetSQLValueString($_POST['onDeck'], "text"),
                   GetSQLValueString($_POST['updateComments'], "text"),
                   GetSQLValueString($_POST['username'], "text"));

Please advise. Thank you!

PHP´s ucfirst capitalizes the first letter of a string. See http://us1.php.net/ucfirst

So to capitalize you probaply want to

GetSQLValueString(ucfirst($_POST['onDeck']), "text")

Or ucwords if that´s what you need. Assuming GetSQLValueString is some sort of sql injection security. Otherwise, you might want to read up on SQL injection techniques

http://en.wikipedia.org/wiki/SQL_injection