Which wasn't all of it, it sounds like you just need some simple variable include.
Have something like
<?
$query = mysql_query("update $table set $field='$var' where $condition_field='$condition'");
if (!$query)
{
echo "Error: ".mysql_error($query);
}
?>
Then just set the variables to whatever you want inside another PHP file and include the above file, called update.php or whatever you want.
As the variables will be passed through to the include the update should take place. But what updates take place will be dependant on which names you give for the variables $table, $field, $var, $condition_field and $condition.