in the future, please compress the php file into a zip archive rather than pasting the page code, it is easier to read that way.
The data types in the update record behavior are not set correctly.
Double click the update record behavior and make sure that the data type for each of the columns is set to text.