I've the following problem. I have a search page with all different kind of arrangements. These are selected random and a stored in a session (because there are only displayed 20 per page)
But these session has to stay the same when a user selects a arrangement and goes back to the overal search page.
The arrangements are devided into 4 types. And they all load on the same search page. When I select type 2 there should be made a new session for type 2 if it isn't there yet. When I select type 1 there sould be made a new session for type 1 if it isn't there yet. So you get my point?
The problem is that when I go to the website and select type 1 it all goes well without any problems. But when I select type 2 it shows no results because it cant come through the isset check.
So my code is:
- Code: Select all
if(isset($resultaat[''.$type_id.''])){ // so if array $resultaat[''.$type_id.''] is not NULL
if($_GET["posts"] == ""){ // If you are not switching page within the type
include("html/search_session.php"); // make new session
}
}
$resultaat = array();
if($type_id == '1'){
$resultaat['1'] = ''.$_SESSION['paginas'].'';
}elseif($type_id == '2'){
$resultaat['2'] = ''.$_SESSION['paginas'].'';
}elseif($type_id == '3'){
$resultaat['3'] = ''.$_SESSION['paginas'].'';
}elseif($type_id == '4'){
$resultaat['4'] = ''.$_SESSION['paginas'].'';
}
Do you get my point? And could somebody help me?

