Hi.
I have a list of clients. One of the elements is his telephone number:
clientes___celular
What i want to achieve is:
When the user update Fabriks form (click on Save button)
the element value (telephone number) is also updated on J! profile table
What i did:
1- selected the client for
2- added php plugin
3- set OnBeforeProcess
4- used the code
What happened: got error:
CAn you guys help me with that, please?
Tx a lot!
I have a list of clients. One of the elements is his telephone number:
clientes___celular
What i want to achieve is:
When the user update Fabriks form (click on Save button)
the element value (telephone number) is also updated on J! profile table
What i did:
1- selected the client for
2- added php plugin
3- set OnBeforeProcess
4- used the code
Code:
global $database;
$celular = mosGetParam($_POST, 'clientes___celular');
$uid = mosGetParam($_POST, 'chdg4_users___id');
$sql = "UPDATE chdg4_users_profile SET profile_value = celular WHERE profile_key = profile.phone AND user_id=$uid";
$database->setQuery($sql);
$database->query();
What happened: got error:
0
Call to undefined function mosGetParam()
CAn you guys help me with that, please?
Tx a lot!