Prova così:
Codice PHP:
if (mysql_query("update " $tabella " set item = '" $item "', value = '" $value ."' where id = " $n))