Welcome Guest, Not a member yet? Register   Sign In
Sessions and Template
#1

[eluser]rrasco[/eluser]
*Please see post #3 for updates: http://ellislab.com/forums/viewreply/575399/

I have an app that is having problems with session. I didn't build this app, I was just supposed to integrate it into the design. I utilized the template library to do this. However, I am having some issues with session data not being stored correctly.

I have a page that lists contests, and in doing so, it stores the contest_id as session data so it can be used on the next action. The action is enter($id), so an example URL would be: index.php/contests/enter/10.

If I echo $id, I get a result of 10. I use $id to assign the session data:

Code:
$this->session->set_userdata('contest_id', $id);

This should store 10 as session variable 'contest_id'. I can verify this by:

Code:
echo $this->session->userdata('contest_id'); // this returns a value of 10 as well

The problem is, when I attempt to use 'contest_id' it returns a value other than 10, it is actually assigning 'img' to the session item in the db. This happens with sessions db enabled/disabled. All other session data is being stored correctly.

Code:
a:7:{s:10:"contest_id";s:3:"img";s:3:"uid";s:1:"6";s:6:"logged";s:1:"y";s:9:"entry_fee";s:5:"25.00";s:3:"adu";s:6:"capear";}

This problem seems to arise after the Template library is used. Does anyone know if there are known issues with Template interfering with session data? Or any other reason this may happen?

TIA


Messages In This Thread
Sessions and Template - by El Forum - 05-07-2009, 12:28 PM
Sessions and Template - by El Forum - 05-07-2009, 02:25 PM
Sessions and Template - by El Forum - 05-07-2009, 06:18 PM
Sessions and Template - by El Forum - 05-07-2009, 08:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB