The only thing I see that is wrong is the following line:
$update = mysql_query("$sql",$db);
it should be:
$update = mysql_query($sql,$db);
And also $db should be the link identifier.
(It looks like a database name var, could be wrong๐)
By the way usually this is not nessesary. If you don't specify the link identifier it will use the last opened connection.
I suggest you use pconnect but i'm drifiting here. ๐
The update is probably failing here.
The rest of the code looks ok. So if it's still not working show me the form and the code and i c if i can help.
Greetings