I want a user to be able to filter out questions written in a specific language, and do it using an url-parameter when entering the site.
I am in qa-base.php accessing the url-parameter, but I can't seem to keep the variable value when I switch to some of the other pages. Trying with using session variable, but cant get it to work.
$thelang=qa_get('thelang'); // get from URL parameter if possible
if(isset($thelang)){
$_SESSION['thelang'] = $thelang;
echo "<br>Got GET Parameter!<br>";
} else { // get from SESSION variable
$thelang = $_SESSION['thelang']; // this part doesn't seem to work.
}
Thanks for any help! Maybe there is better ways to save the variable between pages.