Right, I've done as you suggested, but am now getting syntax errors. I took out sprintf and npw the code reads as:
$updateSQL = $query = "UPDATE news
SET Type='".mysql_real_escape_string($POST['type'])."', Headline='".mysql_real_escape_string($POST['headline'])."', Poster='".mysql_real_escape_string($POST['poster'])."', Summary='".mysql_real_escape_string($POST['summary'])."', Content='".mysql_real_escape_string($POST['content'])."',";
$query .= (!$POST['image'])?"":"Image='".mysql_real_escape_string($POST['image'])."',";
$query .= "Date='".mysql_real_escape_string($POST['date'])."',
Disabled='".mysql_real_escape_string($POST['disabled'])."'
WHERE id='".mysql_real_escale_string($POST['id'])."'"
GetSQLValueString($HTTP_POST_VARS['type'], "int"),
GetSQLValueString($HTTP_POST_VARS['headline'], "text"),
GetSQLValueString($HTTP_POST_VARS['poster'], "text"),
GetSQLValueString($HTTP_POST_VARS['summary'], "text"),
GetSQLValueString($HTTP_POST_VARS['content'], "text"),
GetSQLValueString($HTTP_POST_VARS['image'], "text"),
GetSQLValueString($HTTP_POST_VARS['date'], "date"),
GetSQLValueString(isset($HTTP_POST_VARS['disabled']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString($HTTP_POST_VARS['Id'], "int");
I get the error: Parse error: syntax error, unexpected T_STRING in C:\Documents and Settings\Richard Aspden\My Documents\My Webs\PHP\RLI\admin\news\edit_news_test.php on line 111
Line 111 is the GetSQLValueString($HTTP_POST_VARS['type'], "int"), line. Any suggestions?