Reputation: 339
something weird is happening on the website I am doing. Per the forums I've read, session ids don't change even we refresh or reload the page. Which is correct. The thing is, my session id is changing for some records when I click Edit (to go to edit mode) some are not.
This is the scenario happening. I will view record A. Then click Edit button. All fields are populating correctly since my session id did not change.
But when I view record B and click edit, all fields became blank. Upon checking, my session id changed.
all action, validation and so on (except for data on backend, of course), A and B are the same. I don't know why everytime I edit record B, session id changes while record A doesn't.
Any idea when does session id changes?
Im using this by the way:
$this->session->userdata('session_id')
Upvotes: 1
Views: 3858
Reputation: 41
In /application/config/config.php
,check the $config['sess_time_to_update']
value.
Increase the time if needed.
Upvotes: 1