Welcome Guest, Not a member yet? Register   Sign In
native setcookie and ajax
#1

[eluser]deco10[/eluser]
Hi
I know this isn't really in the scope of the forum but I need to use native cookies instead of CI cookies.

I've had some problems with CI sessions and I can't risk having it work intermittently.

Is it possible to use native php cookies and have it work with the CI Ajax library?

So I should be able to set a cookie with an ajax call then show the data of that cookie with the next full page load.


Thanks for any input!
#2

[eluser]skunkbad[/eluser]
I haven't used the CI Ajax library, but I use my own ajax and standard PHP sessions on my site. I enabled hooks in config.php, and then made a hook that starts the standard PHP session for all requests. It also names the session, sets if it is persistant or not, and if so for how long. If you've used standard PHP sessions before, and you've created a hook before, then this should be a very simple task to complete.

There are many good arguments for using CIs sessions, but why not have the option to use both? I do.




Theme © iAndrew 2016 - Forum software by © MyBB