I ran into this one myself!
It's the quotes...
Try this, see if it doesn't improve things.
note: only first and last double quotes remain,
others have been changed to single quotes.
Commas inserted after 'Joey', and 'soap'.
eg $sql = "UPDATE user u, detalis d, SET u.username = 'Joe',
u.password = 'Soap',
d.firstname = 'Joey',
d.lastname = 'soap',
Where u.user_id = d.det_id AND
u.user_id ='13' ";