Hi
I want to save form data into a database table. Everytime I change the data in the frontend and save, CF6 uses INSERT instead of UPDATE.
INSERT is OK if a new user fills in the empty form. For existing users it should update (data in form is loaded automatically if user is logged in).
In the database table the first column is named "id" and is Primary key.
Is there anything else I need to add?
Thanks a lot!
Regards
Patrick

I want to save form data into a database table. Everytime I change the data in the frontend and save, CF6 uses INSERT instead of UPDATE.
INSERT is OK if a new user fills in the empty form. For existing users it should update (data in form is loaded automatically if user is logged in).
In the database table the first column is named "id" and is Primary key.
Is there anything else I need to add?
Thanks a lot!
Regards
Patrick

[_success] => Data saved successfully
[log] => Array
(
[0] => INSERT INTO `d4r5_jsn_users` (`firstname`, `lastname`) values ('Mickey', 'Mouse Test');
)
[var] => Array
(
[firstname] => Mickey
[lastname] => Mouse Test
[id] => 2138
)
)
)