This is a change that may be a little difficult to make manually since the code you are editing was created with DataAssist. If you can post back with the page that contains the updated code in it I can take a look at things and let you know what I think. I should be able to help you get this worked out.
Just for clarification, the session variable $_SESSION['UserID'] is set when you are on this update page correct?