I'm trying to update a table based on a session variable. Unfortunately, I keep getting an invalid mysql code error. Below is the code I'm using:
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "indProForm")) {
$updateSQL = sprintf("UPDATE individualprofile SET City=%s, `State`=%s, Zip=%s, WHERE Id=" .$_SESSION['RegId'],
GetSQLValueString($_POST['City'], "text"),
GetSQLValueString($_POST['State'], "text"),
GetSQLValueString($_POST['Zip'], "text"),
GetSQLValueString($_POST['Id'], "text"));
mysql_select_db($database_dbConnection, $dbConnection);
$Result1 = mysql_query($updateSQL, $dbConnection) or die(mysql_error());
}
Help solving this problem is much appreciated.