Salve ragazzi, questa è davvero davvero una richiesta stupida, ma non capisco perchè non funziona, cosa ha di sbagliato questa query?

Codice PHP:

$id 
$_GET['id'];
$name $_POST['nome'];

$update "UPDATE categ SET nome='$nome' WHERE id = '$id'";
mysql_query($update) or die (mysql_error()); 
L'errore è il seguente:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

La versione di mysql è questa: MySQL 5.0.22

Grazie