Welcome Guest, Not a member yet? Register   Sign In
Keeping lots of data from one request to the next -- is flashdata usable for this?
#1

[eluser]parham90[/eluser]
Hello,

As said earlier in another thread, I am working on a sign up wizard. Previously, in the second step, the meta data (E.G. first name, last name, etc) were received from the user and added to the database. However, since step two is not the last step and step three actually is, I want the adding of data to not be done until the third step, too, is completed. So, what I need to do is to keep the values entered by the user in the second step, combine it with the data given in the third step, and then add them all together. Now, the question is, how can I do that? Should I use flashdata and keep using keep_flashdata (or whatever the name is; will look it up in the guide if the answer is "Yes").

Thanks!
#2

[eluser]mddd[/eluser]
Flash data is put in the user's cookie. It is sent to the user. If it is a lot, it's better to store it on the server.

The easiest way is to use session variables. (Not CI's session, but php's $_SESSION).
You could also store data in the database or in a file and get it back when the user reload, bases on the unique session id that is in the CI session.
#3

[eluser]clip[/eluser]
Another option if you are posting with forms is to store the previously submited data into hidden form fields. I know this really isn't answering your question but thought I would share.




Theme © iAndrew 2016 - Forum software by © MyBB