Badshah - thank you very much for your help, really appreciate it!
I've replaced with your code (and am running it after registration as you suggest), now I:
- Don't get the same error as before
- Don't get any errors of any kind
- The usergroup for the user is updated properly to '9' as per the code
- ?but unfortunately, the 3 custom profile fields are not updated...
I'm guessing that my problem may lie in the way the inputs from the user are handled, i.e. cfield_2, cfield_6 and cfield_7 - these are currently 3 text inputs on the previous page (named and ID'd like this), which are 'posted' to this page with the code we're discussing...
I'm sorry this is probably basic stuff - do I need to declare these posted variables at all on this page or anything?
Thank you for your time.