Hi,
On my website the user is able to choose between to styles of a gallery. A gridview and a stripe view.
I want to store the choice during the whole session.
So if the user chooses a style I do it like so:
$query = $_GET['view'];
if($query){
$session->set('view', $query);
}
So that's working pretty fine, but after a random number of menuclicks or reloads its gone. Sometimes it is stored for 10 -15 pageloads and sometimes it's gone after 2 loads,
Lifetime is set to 3600 in php.ini
session.gc_maxlifetime = 3600
This is how I look if it exists:
if($session->view == 'grid'){
include('album-grid-title.php');
$session->set('view', $query);
}
elseif($session->view == 'stripes'){
include('album-stripes.php');
$session->set('view', $query);
}
else{
include('album-stripes.php');
}
Can anyone point me in the right direction and tell me what I'm doing wrong or why $session gets lost?
Thanks in advance