Welcome Guest, Not a member yet? Register   Sign In
cookies & sessions outside CI
#1

[eluser]internut[/eluser]
Hey all,

While i'm using sessions & cookies within CI I'm trying to set them normally via:

$_SESSION[hmm] = "hi i'm session";

$_COOKIE[hmm] = "hi i'm cookie";

and be able to call them outside CI (IE: .htaccess mod rewrite file).

I have had luck but i lose them from one controller to another. So If i'm losing it from controller to controller I'm guessing its not availble in a simple .php file w/ session_start(); ?

If I'm not making sense its because its 2am and i've been up for 32 hours Smile
#2

[eluser]Aea[/eluser]
I don't think you can request variables (also, make sure your syntax is proper, keys are ['key'] not [key]) via $_COOKIE, $_COOKIE just retrieves values.

Look into native sessions if you need to use stuff like $_SESSION Smile
#3

[eluser]internut[/eluser]
Aea, thanks for that. Shoulda figured it out searching but my eyes were shutting on me. Thx again. Got the native + CI session going.




Theme © iAndrew 2016 - Forum software by © MyBB