Upsert a record in the CRM

Upsert a record in the CRM

Hi
Im building a customer portal. The user's details are already in the CRM.

I want them to login to the customer portal and see a form that is autopopulated with their Contact record's details from the CRM. I have done this and its working.

However, now I want them to edit these details and upsert it back into the CRM. Ive got this working, however, when I click Submit the form says its submitted successfully but then shows the OLD details. 

How can I have this so the form shows the details that theyve just submitted?

Thanks