Welcome Guest, Not a member yet? Register   Sign In
Session data
#1

[eluser]Ngulo[/eluser]
hello, I read that CodeIgniter uses cookies for saving also the sessions data ,really?
can not save data in the array generated $ _SESSION []?
Need i always to save sessions in a cookie?
#2

[eluser]jswat[/eluser]
I was having some trouble and reservations using the CodeIgniter 'sessions' and found out that there is actually a plugin called "Native Sessions" that will allow you to use 'true' PHP sessions.

It loads and can be used pretty much exactly the same way that the CodeIgniter sessions are.

http://codeigniter.com/wiki/Native_session/
#3

[eluser]Ngulo[/eluser]
thank you jswat Wink

i was wondering if i can use simple "PHP procedural mode" to taking trace of sessions?

could i use a simple if($_SESSION){do this}else {redirect}?


maybe is one of the thing i prefer to use in simple PHP (no framework) mode
can i do this in a controller function? or in a direct view?

i think there's no problem but my brain is taking hot to understand if i could use at same time Codeigniter basics + my own code(like a simple if/else)

maybe i'm wondering my self too much Tongue ?

...anyway i will try some solutions to see wich are the best for me Wink


thanks again
#4

[eluser]jswat[/eluser]
I believe that you can use $_SESSION to access and set 'true' PHP session data. You should be able to access this in the controller or the view. However, as the goal of using a framework like this is to keep the logic separate from the view, I would recommend doing all of that work in the controller and passing the results to the view.
#5

[eluser]Ngulo[/eluser]
yeah you're right Wink i mean is really the best way to take code and views separated so i should work very hard to mantain always this way of working(and thinking) Smile beacause my experiences were always on non-framworked apps Sad

this cause that now i feel very comforting CI Big Grin

Wink




Theme © iAndrew 2016 - Forum software by © MyBB