Forums

How to load and save users data logged into my form db

JGLamber 02 Mar, 2014
Hello:

I´m trying to load the user session data in order to save some of this data in my form database. In fact I need the username, name, email and id_user (but this last one is automatically saved in the database with chronoforms).

I think that i should use the load Session to data item at the "on load" setup item ( I don`t know if it is better before or after th HTML Render form), and then I can create a hidden field in my form with the field name and field id named like the items that I need (name, username and email). Then I should make new columns in my table DB in order to prepare the table to get in the data saved.

The problem is that It doesn`t work. I can save all the items in my form but the columns with name, email and username are empty.

What can I do with this? What did I wrong?
Could you tell me how to load and save user data logged into my form DB?

Thanks for all.
JGLamber 02 Mar, 2014
No , Thats not what I need. I need to load my session data into my forms data base
GreyHead 02 Mar, 2014
Answer
Hi belga77,

If you have the User ID saved then you don't need the name or username as you can always look them up. If you really do want to save them please see this FAQ

Bob
JGLamber 02 Mar, 2014
Ok thank you for your help. Although I thought that I wouldn`t need to write php code. I thought that It was possible with Session to data.

The php code worked fine and I was able to save the users data.

Thak`s for all.

Best regards.
This topic is locked and no more replies can be posted.