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

[eluser]Ngulo[/eluser]
hi all ,i'm having problems setting some session data

i'm trying to get the equivalent in Codeigniter to this:

Code:
$_SESSION['username']= $asd

i've set to autoload the session class in config file

and so i'm trying to build session's data so far:

Code:
$this->session->set_userdata('name1','value1');

it seems to work but when i repeat this code to create another

Code:
$this->session->set_userdata('name 2',' value 2');
the first one(
Code:
$this->session->set_userdata('name 1','value 1');
) disappears,as if it were destroyed or replaced by the new one you just created

do you know what's going on?

In short, I want to create session variables where I want without those created first to be destroyed when I created a new

i hope you'll understand guys Wink thanks
#2

[eluser]Ngulo[/eluser]
opsss, guys ,I found the solution Tongue, sorry, but I realized that I had cookies disabled, everything works perfectly now, pardon me: D

while we're here, I have a question, I did not understand the difference between userdata and flashdata, but both are session variables?




Theme © iAndrew 2016 - Forum software by © MyBB