We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Using session class to permantly store data while session exists?

Development and Programming

J3roen's avatar
J3roen
21 posts
15 years ago
J3roen's avatar J3roen

I can’t find a way to store data in a session for the time the session exists.

I can only see flashdata (only valid for next page) or cache (for current page across templates).

How would you recommend to handle for example a shopping cart? Is it possible to call the codeigniter session class?

       
Frans Cooijmans's avatar
Frans Cooijmans
36 posts
15 years ago
Frans Cooijmans's avatar Frans Cooijmans

ExpressionEngine extends the CI session class, so as far as i know you cannot call the “normal” session class.

You can create a hook to the session class that retrieves extra data from a different table and append that to the normal session data (linked by session_id).

       
Musa's avatar
Musa
124 posts
15 years ago
Musa's avatar Musa

I am finding the answer too, i need to store something in session, how to store that?

Thnx

       
the3mus1can's avatar
the3mus1can
426 posts
15 years ago
the3mus1can's avatar the3mus1can
if (session_id() == '') session_start();

$_SESSION['key'] = $value;
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.