• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading flash cookie

How can I read flash cookie?

I'm using this code to create a cookie:

user = SharedObject.getLocal("user");
user.data.signedup = true;

and, accessing it using php:

$x = $_COOKIE['signedup'];

But, unable to access. It throws an error:
Message: Undefined index: signedup

How should I access the cookie created? Please help.

[eluser]Dark Preacher[/eluser]
Why don't you use CI session? It's easy enough, set variable in session via your model or controller like this:
$user = $this->session->userdata('user');
and use it like this in your views:
$x = $this->session->userdata('user')

Actually, I want one signup per machine. Flash cookie is global for all browsers, and difficult to delete. That's why I'm using it.

Do you have any idea?

[eluser]Dark Preacher[/eluser]
I think that you still can use CI session, but store them in DB and disable browser match, more info can be found in user guide

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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