Hello Guys, hope someone can help me with this.
So, I have this some application I’m building with CI and I need some user-entered data to be saved until they are manually cleared by a button on the UI of the web application. So I essentially need variables that will stay alive until they are manually deleted.
One way to do this of course (which I have already implemented) is to save the variables to a file. But that means writing to the file, then reading from it. It’s slow. Another way, which I don’t want to use, is to save the variables in a db. Doing that would limit the portability of the app thou, i.e. I won’t be able to easily put it on any remote server for a friend to check out.
I’ve read about custom config files in CI which can hold data, and thou the data I wanted to save isn’t configuration data, the app is small, and I really just need something that can save and hold my data til I clear it, the way a file or a db would. The problem is that when I create a config file, save a user-entered piece of data to a config array variable in that file, and output the result to the browser, it’s fine, but when I enter another piece of data to that array variable and try to output its contents, it’s empty again.
So, any help would be very much appreciated!