rocknbil - 3:50 pm on Apr 11, 2011 (gmt 0)
but it cant update at line 16 if i dont put any quotes for $id.
Exactly . . . $id is null. You need to figure out why, see previous comments.
You can add this right after setting ID:
print "Incoming ID is $id";
But it will most likely be that it looks like this
Incoming ID is
because it's null (or empty). If it's not, it may even be that there's no field in the database named "id", you may have it named "ID", or that you are referencing a non-existent table name (the select statement is otherwise fine.)
In both cases - in your **form** or as a database field name - "ID" and "id" are two different references/names.
You can use the $db->errstr() line I gave you to find out more info from mysql as to why it's dieing there.