Pushing variable from one file to another...

#1
[eluser]rockstyle[/eluser]
How to push some variable from one function to other inside one class. From now i'm using form_hidden but it's really dangerous, because when you edit some user data, you can easily change the value of this form_hidden and change some data of other user.
Can I use variables which was declared one page before, and make it be available for second page? (it's for my forms) I'm looking for option that it'll not be visible in html, not be visible in url bar as some uri segment and not to push it to some cookie, session data...

Any help appreciated.

#2
[eluser]stef25[/eluser]
I know you mention "no session data" but you can store session data in the database. Have a look at the user guide: http://ellislab.com/codeigniter/user-gui...sions.html

The web being stateless, you have to "store" your data somewhere if you want it to be available from one page load the next. Your options are session, database, cookie, $_POST or $_GET ... that's about it Smile

#3
[eluser]rogierb[/eluser]
If you don't want the options stef25 gave you, you can store the value in a file... oh so very 80's

But you best bet would be the sessions table.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.