I made a loginscript which works fine. When the user logs out it will go trough this piece of code:
<?
session_start();
if(session_is_registered('klant')){
session_unset();
session_destroy();
header("Location: http://www.mysite.nl/home");
} else {
header( "Location: http://www.mysite.nl/home" );
}
?>
This works fine.
But now I'm making a dropdownlistbox where the user can choose a language. This value must be put into a session vriable.
No problem so far, but what if a customer logs in to the website, does what he has to do, and logs out. The script above tells: session_destroy, so it will also destroy the session that holds the value of the language the user chose.
How can I prevent that the language variable gets destroyed with the login-session variables?